cvs commit: src/sys/fs/msdosfs msdosfs_vnops.c

Bruce Evans bde at
Fri Jul 20 17:06:58 UTC 2007

bde         2007-07-20 17:06:57 UTC

  FreeBSD src repository

  Modified files:
    sys/fs/msdosfs       msdosfs_vnops.c 
  Implement vfs clustering for msdosfs.
  This gives a very large speedup for small block sizes (in my tests,
  about 5 times for write and 3 times for read with a block size of 512,
  if clustering is possible) and a moderate speedup for the moderatatly
  large block sizes that should be used on non-small media (4K is the
  best size in most cases, and the speedup for that is about 1.3 times
  for write and 1.2 times for read).  mmap() should benefit from clustering
  like read()/write(), but the current implementation of vm only supports
  clustering (at least for getpages) if the fs block size is >= PAGE SIZE.
  msdosfs is now only slightly slower than ffs with soft updates for
  writing and slightly faster for reading when both use their best block
  sizes.  Writing is slower for msdosfs because of more sync writes.
  Reading is faster for msdosfs because indirect blocks interfere with
  clustering in ffs.
  The changes in msdosfs_read() and msdosfs_write() are simpler merges
  of corresponding code in ffs (after fixing some style bugs in ffs).
  msdosfs_bmap() needs fs-specific code.  This implementation loops
  calling a lower level bmap function to do the hard parts.  This is a
  bit inefficient, but is efficient enough since msdsfs_bmap() is only
  called when there is physical i/o to do.
  Approved by:    re (hrs)
  Revision  Changes    Path
  1.172     +49 -6     src/sys/fs/msdosfs/msdosfs_vnops.c

More information about the cvs-src mailing list