Date: Sun, 23 Apr 2006 16:40:35 +0200 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Jean-Yves Lefort <jylefort@FreeBSD.org> Cc: freebsd-geom@FreeBSD.org Subject: Re: multiple of sector size I/O restriction Message-ID: <10365.1145803235@critter.freebsd.dk> In-Reply-To: Your message of "Sun, 23 Apr 2006 15:31:34 %2B0200." <20060423153134.63716562.jylefort@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20060423153134.63716562.jylefort@FreeBSD.org>, Jean-Yves Lefort wri tes: >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=3D/dev/ad1 of=3Dtest bs=3D512 count=3D1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 1.889527 secs (271 bytes/sec) > > # dd if=3D/dev/ad1 of=3Dtest bs=3D513 count=3D1 > 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? That is how disks work. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10365.1145803235>