freebsd-nq/sys/fs/msdosfs
Bruce Evans 93fe42b62f Round up the FAT block size to a multiple of the sector size so that i/o
to the FAT is possible.

Make the FAT block size less arbitrary before it is rounded up:
- for FAT12, default to 3*512 instead of to 3 sectors.  The magic 3 is
  the default number of 512-byte FAT sectors on a floppy drive.  That
  many sectors is too many if the sector size is larger.
- for !FAT12, default to PAGE_SIZE instead of to 4096.  Remove
  MSDOSFS_DFLTBSIZE since it only obfuscated this 4096.

For reading the BPB, use a block size of 8192 instead of 2048 so that
sector sizes up to 8192 can work.  We should try several sizes, or just
try the maximum supported size (MAXBSIZE = 64K).  I use 8192 because
that is enough for DVD-RW's (even 2048 is enough) and 8192 has been
tested a lot in use by ffs.

This completes fixing msdosfs for some large sector sizes (up to 8K
for read and 64K for write).  Microsoft documents support for sector
sizes up to 4K in mdosfs.  ffs is currently limited to 8K for both
read and write.

Approved by:	re (kensmith)
Approved by:	nyan (several years ago)
2007-07-12 17:17:47 +00:00
..
bootsect.h Remove checks for BOOTSIG[23] from FAT32 bootblocks. 2005-09-29 14:09:46 +00:00
bpb.h Fix some bugs involving the fsinfo block (many remain unfixed). This is 2007-07-12 16:09:07 +00:00
denode.h Add a 3rd entry in the cache, which keeps the end position 2007-01-16 23:43:14 +00:00
direntry.h Replace slightly crummy fattime<->timespec conversion functions. 2006-10-24 11:14:05 +00:00
fat.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:10:42 +00:00
msdosfs_conv.c o From the submitter: dos2unixchr will convert to lower case if 2006-11-26 18:49:44 +00:00
msdosfs_denode.c Make insmntque() externally visibile and allow it to fail (e.g. during 2007-03-13 01:50:27 +00:00
msdosfs_fat.c Fix some bugs involving the fsinfo block (many remain unfixed). This is 2007-07-12 16:09:07 +00:00
msdosfs_fileno.c Normalize a significant number of kernel malloc type names: 2005-10-31 15:41:29 +00:00
msdosfs_iconv.c
msdosfs_lookup.c Do not assume that `char direntry::deExtension[3]' starts right after 2006-01-22 21:09:38 +00:00
msdosfs_vfsops.c Round up the FAT block size to a multiple of the sector size so that i/o 2007-07-12 17:17:47 +00:00
msdosfs_vnops.c Eliminate now-unused SUSER_ALLOWJAIL arguments to priv_check_cred(); in 2007-06-12 00:12:01 +00:00
msdosfsmount.h Fix some bugs involving the fsinfo block (many remain unfixed). This is 2007-07-12 16:09:07 +00:00