Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Aug 2005 03:20:57 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/85366: [ PATCH ] MSDOSFS doesn't mark volume "clean" (sometime)
Message-ID:  <200508280120.j7S1KvkE002469@kulesh.obluda.cz>
Resent-Message-ID: <200508280130.j7S1ULd5054070@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


>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:



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