Date: Sun, 23 Apr 2006 17:56:05 +0200 From: Jean-Yves Lefort <jylefort@FreeBSD.org> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: freebsd-geom@FreeBSD.org Subject: Re: multiple of sector size I/O restriction Message-ID: <20060423175605.35a26523.jylefort@FreeBSD.org> In-Reply-To: <10365.1145803235@critter.freebsd.dk> References: <20060423153134.63716562.jylefort@FreeBSD.org> <10365.1145803235@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Sun__23_Apr_2006_17_56_05_+0200_HaDUqp6tUy.QZGft Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 23 Apr 2006 16:40:35 +0200 "Poul-Henning Kamp" <phk@phk.freebsd.dk> wrote: > In message <20060423153134.63716562.jylefort@FreeBSD.org>, Jean-Yves Lefo= rt wri > tes: >=20 > >In sys/geom/geom_io.c, g_io_check() I find this: > > > > /* Reject I/O not on sector boundary */ > > if (bp->bio_offset % pp->sectorsize) > > return (EINVAL); > > > >Which causes this: > > > > # dd if=3D3D/dev/ad1 of=3D3Dtest bs=3D3D512 count=3D3D1 > > 1+0 records in > > 1+0 records out > > 512 bytes transferred in 1.889527 secs (271 bytes/sec) > > > > # dd if=3D3D/dev/ad1 of=3D3Dtest bs=3D3D513 count=3D3D1 > > dd: /dev/ad1: Invalid argument > > 0+0 records in > > 0+0 records out > > 0 bytes transferred in 0.000254 secs (0 bytes/sec) > > > >Why this restriction? >=20 > That is how disks work. I should reformulate my question. I've found some linux code which reads from a raw cd device in non-multiples of the sector size; I imagine that this code works on linux. This leads me to think that it is possible to overcome the hardware limitation by software means. Am I right? --=20 Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ --Signature=_Sun__23_Apr_2006_17_56_05_+0200_HaDUqp6tUy.QZGft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFES6OVyzD7UaO4AGoRAji4AJkBt/179r8wbcvcbT17slTCDJxr/QCeMz15 nWuzbp5beL9ndWEP5HjXCTs= =2QAv -----END PGP SIGNATURE----- --Signature=_Sun__23_Apr_2006_17_56_05_+0200_HaDUqp6tUy.QZGft--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060423175605.35a26523.jylefort>