svn commit: r245283 - in stable/9/sys: kern sys ufs/ffs

Konstantin Belousov kib at FreeBSD.org
Fri Jan 11 05:39:18 UTC 2013


Author: kib
Date: Fri Jan 11 05:39:17 2013
New Revision: 245283
URL: http://svnweb.freebsd.org/changeset/base/245283

Log:
  MFC r244925:
  Add yet another flag for the vfs_write_resume_flags() to avoid calling
  suspension cleanup handler after the suspend is lifted, and use it in
  the ffs_snapshot() call to vfs_write_resume.

Modified:
  stable/9/sys/kern/vfs_vnops.c
  stable/9/sys/sys/vnode.h
  stable/9/sys/ufs/ffs/ffs_snapshot.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/vfs_vnops.c
==============================================================================
--- stable/9/sys/kern/vfs_vnops.c	Fri Jan 11 05:35:04 2013	(r245282)
+++ stable/9/sys/kern/vfs_vnops.c	Fri Jan 11 05:39:17 2013	(r245283)
@@ -1641,7 +1641,8 @@ vfs_write_resume_flags(struct mount *mp,
 			mp->mnt_writeopcount++;
 		}
 		MNT_IUNLOCK(mp);
-		VFS_SUSP_CLEAN(mp);
+		if ((flags & VR_NO_SUSPCLR) == 0)
+			VFS_SUSP_CLEAN(mp);
 	} else if ((flags & VR_START_WRITE) != 0) {
 		MNT_REF(mp);
 		vn_start_write_locked(mp, 0);

Modified: stable/9/sys/sys/vnode.h
==============================================================================
--- stable/9/sys/sys/vnode.h	Fri Jan 11 05:35:04 2013	(r245282)
+++ stable/9/sys/sys/vnode.h	Fri Jan 11 05:39:17 2013	(r245283)
@@ -394,6 +394,7 @@ extern int		vttoif_tab[];
 #define	V_XSLEEP	0x0004	/* vn_start_write: just return after sleep */
 
 #define	VR_START_WRITE	0x0001	/* vfs_write_resume: start write atomically */
+#define	VR_NO_SUSPCLR	0x0002	/* vfs_write_resume: do not clear suspension */
 
 #define	VREF(vp)	vref(vp)
 

Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- stable/9/sys/ufs/ffs/ffs_snapshot.c	Fri Jan 11 05:35:04 2013	(r245282)
+++ stable/9/sys/ufs/ffs/ffs_snapshot.c	Fri Jan 11 05:39:17 2013	(r245283)
@@ -686,7 +686,7 @@ out1:
 	/*
 	 * Resume operation on filesystem.
 	 */
-	vfs_write_resume_flags(vp->v_mount, VR_START_WRITE);
+	vfs_write_resume_flags(vp->v_mount, VR_START_WRITE | VR_NO_SUSPCLR);
 	if (collectsnapstats && starttime.tv_sec > 0) {
 		nanotime(&endtime);
 		timespecsub(&endtime, &starttime);


More information about the svn-src-stable-9 mailing list