Re: Question about VFS layers for filesystems

Stephen C. Tweedie (sct@redhat.com)
Mon, 16 Nov 1998 20:19:35 GMT


Hi,

On Thu, 12 Nov 1998 15:22:22 -0500 (EST), Alex Buell
<alex.buell@tahallah.demon.co.uk> said:

> I read in Alessandro Rubini's book "Linux Device Drivers", that the VFS
> layer for 2.0.x kernels is limited to 512 bytes per sector as a minimum.

> Is this still true for 2.1.x? I have just discovered that this out-of-date
> DOS device driver that I have disassembled, uses variable sector sizes
> depending upon the size of the flashcard used. I.e on this 32K flashcard,
> it has a sector size of 32 bytes in DOS 8.3 FAT format. This can vary for
> different flashcards up to 4MB in size.

Yes, it is very much the case. However, the limit is really a property
of the block device IO layers: all buffers in the buffer cache are
labeled by block size, and the labeling must must must be a multiple of
512.

> It would make my life a lot easier if I could just read the superblock
> from the flashcard and set the VFS's sector size to whatever it is -
> ie 512/256/128/64/32 byte sector sizes, and then use the MSDOS
> filesystem layer with it.

Sorry, you'll need to add a translation layer between the filesystem and
the buffer cache for this. It really does not make sense to have a
buffer cache of 32 byte sectors, where the buffer_head label structure
is many times larger than the data itself: the inefficiency would be
mind-boggling!

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/