From dan@kulesh.obluda.cz  Sun Aug 28 01:21:02 2005
Return-Path: <dan@kulesh.obluda.cz>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 02A4216A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Aug 2005 01:21:02 +0000 (GMT)
	(envelope-from dan@kulesh.obluda.cz)
Received: from kulesh.obluda.cz (kulesh.obluda.cz [193.179.22.243])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DAF2D43D53
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Aug 2005 01:20:59 +0000 (GMT)
	(envelope-from dan@kulesh.obluda.cz)
Received: from kulesh.obluda.cz (localhost.eunet.cz [127.0.0.1])
	by kulesh.obluda.cz (8.13.4/8.13.4) with ESMTP id j7S1Kv45002470
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 28 Aug 2005 03:20:58 +0200 (CEST)
	(envelope-from dan@kulesh.obluda.cz)
Received: (from root@localhost)
	by kulesh.obluda.cz (8.13.4/8.13.1/Submit) id j7S1KvkE002469;
	Sun, 28 Aug 2005 03:20:57 +0200 (CEST)
	(envelope-from dan)
Message-Id: <200508280120.j7S1KvkE002469@kulesh.obluda.cz>
Date: Sun, 28 Aug 2005 03:20:57 +0200 (CEST)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ PATCH ] MSDOSFS doesn't mark volume "clean" (sometime)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         85366
>Category:       kern
>Synopsis:       [msdosfs] [patch] MSDOSFS doesn't mark volume "clean" (sometime)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 28 01:30:21 GMT 2005
>Closed-Date:    Mon Sep 25 17:11:08 GMT 2006
>Last-Modified:  Mon Sep 25 17:11:08 GMT 2006
>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:
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Thu Aug 3 03:56:22 UTC 2006 
State-Changed-Why:  
Patch applied against -HEAD, thanks for your submission! 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Thu Aug 3 03:56:22 UTC 2006 
Responsible-Changed-Why:  
MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85366 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/85366: commit references a PR
Date: Sun, 24 Sep 2006 14:35:42 +0000 (UTC)

 delphij     2006-09-24 14:35:27 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/fs/msdosfs       msdosfs_vfsops.c 
   Log:
   MFC 1.152:
   
   When the volume is being downgraded from a read-write mode, mark
   it as clean.
   
   PR:             kern/85366
   Submitted by:   Dan Lukes <dan at obluda dot cz>
   Approved by:    re (hrs)
   
   Revision   Changes    Path
   1.144.2.5  +4 -0      src/sys/fs/msdosfs/msdosfs_vfsops.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Sep 25 17:10:20 UTC 2006 
State-Changed-Why:  
Patch MFC'ed as rev. 1.144.2.5 of src/sys/fs/msdosfs/msdosfs_vfsops.c. 
Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=85366 
>Unformatted:
