From owner-freebsd-hackers Tue Jul 13 7:37:20 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id 2B49715132 for ; Tue, 13 Jul 1999 07:37:17 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.2/8.8.7) with ESMTP id KAA77622; Tue, 13 Jul 1999 10:36:17 -0400 (EDT) X-Authentication-Warning: janus.syracuse.net: green owned process doing -bs Date: Tue, 13 Jul 1999 10:36:17 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: Luigi Rizzo Cc: hackers@FreeBSD.org Subject: Re: Why 'dd' does not seek over 'char' devs (specifically raw disk partitions). In-Reply-To: <199907131250.OAA00397@prova.iet.unipi.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 13 Jul 1999, Luigi Rizzo wrote: > Hi, i have a question. > > Why 'dd' does not seek over 'char' devs (specifically raw disk partitions). Not all character devices support seeking. So, we work with the LCD... Sorry, I don't like this either. It would be better, maybe, just to fix character devices. > > 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. You certainly make a good case. modify your local copy of dd to do what you want. > > I notice that on output lseek _is_ used also on char devices. And how else would you do it? > > Ideas ? > > cheers > luigi > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message