GEOM and changing floppy sector sizes
User Staylor
staylor at mrynet.com
Thu Jun 1 16:22:57 PDT 2006
I have a situation with FreeBSD 7-current and the geom structure used
for the fdc floppy controller.
To access floppy media that has sectors with differing sector sizes,
I issue an FD_STYPE ioctl call to change the sector size.
This appears to work fine when incresing the sector size (say from
128 to 256). However, if the already-opened file-descriptor attempts
to change the sector size down to 128 when 256-byte sectors have already
been read on the FD, an "Invalid argument" (EINVAL) is returned.
Is this indicating a limitation in the GEOM kernel code, or is it
a bug?
I have confirmed that the read() request never makes it to the fdc driver
code in the kernel, so the GEOM or other code is returning the error.
And I can successfully perform reads to the opened device descriptor
using the last-used (in this case 256) sector size by doubling read
byte-count request (to 256), and then I can only perform seeks to every
other sector's byte position.
Any suggestions on how to further isolate the limitation, or any more
info I can provide?
I thought perhaps the GEOM mechanism used by fdc(4) was limiting
sector changes on established media as I want to accomplish.
Thanks in advance,
-scott
More information about the freebsd-geom
mailing list