From owner-freebsd-current@FreeBSD.ORG Tue Jan 25 21:31:23 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7132416A4CF for ; Tue, 25 Jan 2005 21:31:23 +0000 (GMT) Received: from users.altadena.net (users.altadena.net [207.151.161.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AF0643D53 for ; Tue, 25 Jan 2005 21:31:23 +0000 (GMT) (envelope-from pete@users.altadena.net) Received: from pete by users.altadena.net with local (Exim 4.43) id 1CtYHT-000Oow-1m for current@freebsd.org; Tue, 25 Jan 2005 13:31:23 -0800 Date: Tue, 25 Jan 2005 13:31:23 -0800 From: Pete Carah To: current@freebsd.org Message-ID: <20050125213123.GA95337@users.altadena.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Sender: Pete Carah Subject: Another floppy-related problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jan 2005 21:31:23 -0000 There was another interesting problem uncovered by my trying to read in most of my old floppy archive disks while I still could (!); cp *always* mmaps the input file. If there is a hard error on a slow device, the fact that the vnode-pager is doing the read makes the entire system hang. This is not desirable for floppies for 2 reasons: 1. they are slow. 2. they are error-prone. I suppose I could dd the whole floppy to a temp, then open it virtual. If that were done with conv=noerror,sync then (in many cases) one could recover as much data as could be recovered. That would be a fairly easy script, and would probably be faster than reading the files directly from the slow medium, at least if a full-track blocksize worked in the dd. However, it *would* be nice to have a flag to cp, or another similar command (I might be able to use cpio or tar in a pipeline?) that did ordinary reads and not mmap... (for that matter, there are devices (I suspect floppies are one of these, and I have seen hints that cdrom's are too) for which ordinary reads are much faster than mmap for whatever reason.) -- Pete