dosfstools/dosfstools — pull request #1 by arnout (2014-11-27 13:54:02+00:00)
Title: fsck.fat: add the -m (mmap) option

By using mmap, we avoid allocating the entire FAT table, and we make it
possible for the OS to read in pages from the disk on demand only.

This option is only available in combination with -w, because any write
to the mmapped region may be written to disk at any time.

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771091

Limitations and possible improvements:
- Don't know if mmap is available with DJGPP.
- mmap could be used unconditionally if -w is given.
- The conditional handling could be moved to fs_read/fs_write.
- The same change would be useful in fatlabel and mkfs.fat.