svn commit: r246219 - head/sys/fs/msdosfs
Konstantin Belousov
kib at FreeBSD.org
Fri Feb 1 18:30:42 UTC 2013
Author: kib
Date: Fri Feb 1 18:30:41 2013
New Revision: 246219
URL: http://svnweb.freebsd.org/changeset/base/246219
Log:
The MSDOSFSMNT_WAITONFAT flag is bogus and broken. It does less than
track the MNT_SYNCHRONOUS flag. It is set to the latter at mount time
but not updated by MNT_UPDATE.
Use MNT_SYNCHRONOUS to decide to write the FAT updates syncrhonously.
Submitted by: bde
MFC after: 1 week
Modified:
head/sys/fs/msdosfs/msdosfs_fat.c
Modified: head/sys/fs/msdosfs/msdosfs_fat.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 1 18:25:53 2013 (r246218)
+++ head/sys/fs/msdosfs/msdosfs_fat.c Fri Feb 1 18:30:41 2013 (r246219)
@@ -379,7 +379,7 @@ updatefats(pmp, bp, fatbn)
((u_int8_t *)bpn->b_data)[3] |= 0x80;
else if (cleanfat == 32)
((u_int8_t *)bpn->b_data)[7] |= 0x08;
- if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT)
+ if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS)
bwrite(bpn);
else
bdwrite(bpn);
@@ -389,7 +389,7 @@ updatefats(pmp, bp, fatbn)
/*
* Write out the first (or current) fat last.
*/
- if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT)
+ if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS)
bwrite(bp);
else
bdwrite(bp);
More information about the svn-src-all
mailing list