freebsd-skq/sys/fs/msdosfs
Bruce Evans ed316d339f Remove some of the pessimizations involving writing the fsi sector.
All active fields in fsi are advisory/optional, so we shouldn't do
extra work to make them valid at all times, but instead we write to
the fsi too often (we still do), and we searched for a free cluster
for fsinxtfree too often.

This commit just removes the whole search and its results, so that we
write out our in-core copy of fsinxtfree instead of writing a "fixed"
copy and clobbering our in-core copy.  This saves fixing 3 bugs:
- off-by-1 error for the end of the search, resulting in fsinxtfree
  not actually being adjusted iff only the last cluster is free.
- missing adjustment when no clusters are free.
- off-by-many error for the start of the search.  Starting the search
  at 0 instead of at (the in-core copy of) fsinxtfree did more than
  defeat the reasons for existence of fsinxtfree.  fsinxtfree exists
  mainly to avoid having to start at 0 for just the first search per
  mount, but has the side effect of reducing bias towards allocating
  near cluster 0.  The bias would normally only be generated by the
  first search per mount (if fsinxtfree is not supported), but since
  we also adjusted the in-core copy of fsinxtfree here, we were doing
  extra work to maximize the bias.

Approved by:	re (kensmith)
2007-09-23 14:49:32 +00:00
..
bootsect.h
bpb.h
denode.h Fix some style bugs (some whitespace errors only). 2007-08-07 03:22:10 +00:00
direntry.h Fix races in msdosfs_lookup() and msdosfs_readdir(). These functions 2007-08-31 22:29:55 +00:00
fat.h
msdosfs_conv.c Fix races in msdosfs_lookup() and msdosfs_readdir(). These functions 2007-08-31 22:29:55 +00:00
msdosfs_denode.c Fix some style bugs (don't assume that off_t == int64_t; fix some comments; 2007-08-07 03:59:49 +00:00
msdosfs_fat.c Remove some of the pessimizations involving writing the fsi sector. 2007-09-23 14:49:32 +00:00
msdosfs_fileno.c Remove unused include(s). 2007-08-07 02:08:06 +00:00
msdosfs_iconv.c Remove unused include(s). 2007-08-07 02:08:06 +00:00
msdosfs_lookup.c Fix races in msdosfs_lookup() and msdosfs_readdir(). These functions 2007-08-31 22:29:55 +00:00
msdosfs_vfsops.c On 6.x this works: 2007-08-15 17:40:09 +00:00
msdosfs_vnops.c Fix races in msdosfs_lookup() and msdosfs_readdir(). These functions 2007-08-31 22:29:55 +00:00
msdosfsmount.h