Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Feb 2013 18:30:42 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246219 - head/sys/fs/msdosfs
Message-ID:  <201302011830.r11IUgEJ018636@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302011830.r11IUgEJ018636>