[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FAT and Stores



> I am working on Marcus' fatfs-0.1.

Good man!

> When mounting a floppy drive, however, I get:
> bytes_per_sector = 512
> store->block_size = 1024

This is odd.  Please try storeinfo and storeread on the floppy device.
(I presume you are using /dev/fd0 with the usual /hurd/storeio translator.)
See what that shows you, and with storeread you can actually try to read 
512 bytes from offset 512 and that just won't work if the block size is
really 1024.  You can also try the same with dd on /dev/fd0.

All the floppy drivers I can find use a block size of 512, so I am
confused.  It might be that storeinfo will show you that you are really
using a file on your ext2fs filesystem (that happens to use 1k filesystem
blocks), meaning your storeio translator is not set up right, which would
make it all make sense.

> How do stores determine block_size?  Really all I'm trying to determine is
> if this is something I should fix on the translator end (ie, have fatfs
> read 2 FAT sectors for every store entry [simulated inode?]) or is this
> something that needs to be corrected for at the diskfs level?  

Well, arguably both, I suppose.  That is, it seems like fatfs ought to cope
with the device block size being a multiple of the filesystem block size.
(I'm not sure ext2fs or hurd deals with this case either, but since their
filesystem blocksizes are 1k or 4k it hasn't come up.)

But it is certainly not normal for the actual floppy disk device 
to report any device size other than 512.



Reply to: