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
This commit is contained in:
Konstantin Belousov 2013-02-01 18:30:41 +00:00
parent 79fb7dd167
commit 11fca81ccd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246219

View File

@ -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);