kern/85366: [ PATCH ] MSDOSFS doesn't mark volume "clean" (sometime)

Dan Lukes dan at obluda.cz
Sun Aug 28 01:30:22 GMT 2005


>Number:         85366
>Category:       kern
>Synopsis:       [ PATCH ] MSDOSFS doesn't mark volume "clean" (sometime)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 28 01:30:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 6.0-BETA3 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD 6.0-BETA3: Sat Aug 27 17:43:26 CEST 2005 i386
src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.144 2005/03/24 07:36:13

>Description:
	The msdosfs doesn't mark volume as clean when mount downgraded to
read-only.

	In advance, the volume is not marked clean even if the volume is
dismounted later.

>How-To-Repeat:
>Fix:

	Mark the volume clean when downgraded to RO:

--- patch begins here ---
--- msdosfs_vfsops.c.ORIG	Thu Mar 24 08:36:13 2005
+++ msdosfs_vfsops.c	Sun Aug 28 02:40:40 2005
@@ -285,6 +285,10 @@
 			g_access(pmp->pm_cp, 0, -1, 0);
 			g_topology_unlock();
 			PICKUP_GIANT();
+			/* Now the volume is clean. Mark it. */
+			error = markvoldirty(pmp, 0);
+			if (error)
+				return (error);
 		} else if ((pmp->pm_flags & MSDOSFSMNT_RONLY) &&
 		    !vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) {
 			/*
--- patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list