multiple of sector size I/O restriction
Jean-Yves Lefort
jylefort at FreeBSD.org
Sun Apr 23 13:31:41 UTC 2006
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=/dev/ad1 of=test bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 1.889527 secs (271 bytes/sec)
# dd if=/dev/ad1 of=test bs=513 count=1
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?
--
Jean-Yves Lefort
jylefort at FreeBSD.org
http://lefort.be.eu.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20060423/9da74bbf/attachment.pgp
More information about the freebsd-geom
mailing list