From owner-freebsd-hackers Tue Jul 13 5:57:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from prova.iet.unipi.it (slip17.unipi.it [131.114.14.1]) by hub.freebsd.org (Postfix) with ESMTP id C954A152AD for ; Tue, 13 Jul 1999 05:57:07 -0700 (PDT) (envelope-from luigi@iet.unipi.it) Received: (from luigi@localhost) by prova.iet.unipi.it (8.8.8/8.8.8) id OAA00397 for hackers@freebsd.org; Tue, 13 Jul 1999 14:50:35 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <199907131250.OAA00397@prova.iet.unipi.it> Subject: Why 'dd' does not seek over 'char' devs (specifically raw disk partitions). To: hackers@freebsd.org Date: Tue, 13 Jul 1999 14:50:34 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, i have a question. Why 'dd' does not seek over 'char' devs (specifically raw disk partitions). My point is, when a disk develops problems, sometimes it is possible to recover nearby sectors e.g. using dd, and seeking to the right block. However running dd over the char device (rwd*) takes forever because the seek on char devices is implemented by reading instead. Using the cooked device is problematic because the buffering causes multiple sectors to be read and this may cause errors if some block nearby has problems. I notice that on output lseek _is_ used also on char devices. Ideas ? cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message