freebsd-dev/sys/fs/msdosfs
Konstantin Belousov 293e4eb67d The fsync(2) call should sync the vnode in such way that even after
system crash which happen after successfull fsync() return, the data
is accessible.  For msdosfs, this means that FAT entries for the file
must be written.

Since we do not track the FAT blocks containing entries for the
current file, just do a sloppy sync of the devvp vnode for the mount,
which buffers, among other things, contain FAT blocks.

Simultaneously, for deupdat():
- optimize by clearing the modified flags before short-circuiting a
  return, if the mount is read-only;
- only ignore the rest of the function for denode with DE_MODIFIED
  flag clear when the waitfor argument is false.  The directory buffer
  for the entry might be of delayed write;
- microoptimize by comparing the updated directory entry with the
  current block content;
- try to cluster the write, fall back to bawrite() if low on
  resources.

Based on the submission by:	bde
MFC after:	2 weeks
2013-05-02 20:00:11 +00:00
..
bootsect.h - Add idempotency guards so the structures can be used in other utilities. 2010-02-13 12:41:07 +00:00
bpb.h - Add idempotency guards so the structures can be used in other utilities. 2010-02-13 12:41:07 +00:00
denode.h Remove unused thread argument from vtruncbuf(). 2012-04-23 13:21:28 +00:00
direntry.h - Add idempotency guards so the structures can be used in other utilities. 2010-02-13 12:41:07 +00:00
fat.h
msdosfs_conv.c - Correct spelling in comments 2013-04-17 11:56:11 +00:00
msdosfs_denode.c The fsync(2) call should sync the vnode in such way that even after 2013-05-02 20:00:11 +00:00
msdosfs_fat.c Do not update the fsinfo block on each update of any fat block, this 2013-02-17 20:35:54 +00:00
msdosfs_fileno.c Use pm_fatlock to protect per-filesystem rb tree used to allocate fileno 2010-02-28 17:16:43 +00:00
msdosfs_iconv.c Remove unused include(s). 2007-08-07 02:08:06 +00:00
msdosfs_lookup.c Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
msdosfs_vfsops.c Do not update the fsinfo block on each update of any fat block, this 2013-02-17 20:35:54 +00:00
msdosfs_vnops.c The fsync(2) call should sync the vnode in such way that even after 2013-05-02 20:00:11 +00:00
msdosfsmount.h Do not update the fsinfo block on each update of any fat block, this 2013-02-17 20:35:54 +00:00