From owner-freebsd-current@FreeBSD.ORG Sat Aug 30 04:20:49 2003 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 0911B16A4BF for ; Sat, 30 Aug 2003 04:20:49 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7357A43FBF for ; Sat, 30 Aug 2003 04:20:47 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id VAA02208; Sat, 30 Aug 2003 21:20:44 +1000 Date: Sat, 30 Aug 2003 21:20:43 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: freebsd-current@freebsd.org In-Reply-To: <20030829182855.GC14251@dragon.nuxi.com> Message-ID: <20030830210326.I3799@gamplex.bde.org> References: <3F4DBD62.C8675452@mindspring.com> <20030828165031.GA91019@dragon.nuxi.com> <3F4F8916.8A3EB699@mindspring.com> <20030829182855.GC14251@dragon.nuxi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Adam K Kirchhoff Subject: Re: IDE DVD playback on 5.1-CURRENT 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: Sat, 30 Aug 2003 11:20:49 -0000 On Fri, 29 Aug 2003, David O'Brien wrote: > On Fri, Aug 29, 2003 at 10:10:46AM -0700, Terry Lambert wrote: > > David O'Brien wrote: > > > On Thu, Aug 28, 2003 at 01:29:22AM -0700, Terry Lambert wrote: > > > > 1) dd if=/dev/acd0 count=1 of=/dev/null > > > > 2) dd if=/dev/acd0c count=1 of=/dev/null > > > > 3) dd if=/dev/acd0a count=1 of=/dev/null > > > ^^^^ > > > bs=2k > > > > Yes, sorry; I forgot that FreeBSD's dd does not stat its endpoints > > to see if they are devices, and gets the st_blksize and insists > > that it be used (at least internally) for S_IFBLK and S_IFCHR > > values of st_mode. > > > > Perhaps it should be unbroken by someone with a commit bit and/or > > the ability to have their send-pr's not rejected as relay SPAM. > > I doubt it, this wasn't necessary with SCSI cdrom's until GEOM -- PHK > thought it a feature to have to require the user to remember the "bs=2k", > so I don't think anyone will ever be able to get this "fixed" in the > tree. This is not only a feaure; it is Standard. From POSIX.1-2001-draft7.txt: %%% 11599 NAME 11600 dd - convert and copy a file ... 11650 ibs=expr Specify the input block size, in bytes, by expr (default is 512). 11651 obs=expr Specify the output block size, in bytes, by expr (default is 512). %%% GEOM has many faults, but this is not one of them. "dd if=/dev/[a]cd0c [bs=512]" hasn't worked since block devices were axed. With block devices, you had to use the raw device, e.g., /dev/racd0c, to attempt to read 512-blocks and fail on normal cdroms because their block size isn't 512. /dev/acd0c was the block device so it could be read with any size at some cost in efficiency.. E.g., requests to read it with a block size of 512 caused the following enblocking and deblocking: - dd block size of 512 converted to BLKDEV_IOSIZE = 2048 - i/o done with block size of 2048. This happens to be the same as the physical block size, so it happens to work and doesn't involve any more enblocking or deblocking - BLKDEV_IOSIZE converted to dd block size. BLKDEV_IOSIZE is now PAGE_SIZE and is only used for bogus things (since it is still used but there are no block devices to use it on). Bruce