Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2012 22:42:28 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r234473 - in stable/9/sys: i386/conf kern sys ufs/ffs
Message-ID:  <201204192242.q3JMgSpR010675@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Thu Apr 19 22:42:28 2012
New Revision: 234473
URL: http://svn.freebsd.org/changeset/base/234473

Log:
  MFC of 234158:
  
  Export vinactive() from kern/vfs_subr.c (e.g., make it no longer
  static and declare its prototype in sys/vnode.h) so that it can be
  called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c)
  instead of the body of vinactive() being cut and pasted into
  process_deferred_inactive().
  
  Reviewed by: kib
  MFC after:   2 weeks

Modified:
  stable/9/sys/kern/vfs_subr.c
  stable/9/sys/sys/vnode.h
  stable/9/sys/ufs/ffs/ffs_snapshot.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)

Modified: stable/9/sys/kern/vfs_subr.c
==============================================================================
--- stable/9/sys/kern/vfs_subr.c	Thu Apr 19 22:37:24 2012	(r234472)
+++ stable/9/sys/kern/vfs_subr.c	Thu Apr 19 22:42:28 2012	(r234473)
@@ -103,7 +103,6 @@ static int	flushbuflist(struct bufv *buf
 static void	syncer_shutdown(void *arg, int howto);
 static int	vtryrecycle(struct vnode *vp);
 static void	vbusy(struct vnode *vp);
-static void	vinactive(struct vnode *, struct thread *);
 static void	v_incr_usecount(struct vnode *);
 static void	v_decr_usecount(struct vnode *);
 static void	v_decr_useonly(struct vnode *);
@@ -2401,7 +2400,7 @@ vdropl(struct vnode *vp)
  * OWEINACT tracks whether a vnode missed a call to inactive due to a
  * failed lock upgrade.
  */
-static void
+void
 vinactive(struct vnode *vp, struct thread *td)
 {
 

Modified: stable/9/sys/sys/vnode.h
==============================================================================
--- stable/9/sys/sys/vnode.h	Thu Apr 19 22:37:24 2012	(r234472)
+++ stable/9/sys/sys/vnode.h	Thu Apr 19 22:42:28 2012	(r234473)
@@ -635,6 +635,7 @@ int	vget(struct vnode *vp, int lockflag,
 void	vgone(struct vnode *vp);
 void	vhold(struct vnode *);
 void	vholdl(struct vnode *);
+void	vinactive(struct vnode *, struct thread *);
 int	vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
 int	vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
 	    off_t length, int blksize);

Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- stable/9/sys/ufs/ffs/ffs_snapshot.c	Thu Apr 19 22:37:24 2012	(r234472)
+++ stable/9/sys/ufs/ffs/ffs_snapshot.c	Thu Apr 19 22:42:28 2012	(r234473)
@@ -2572,20 +2572,9 @@ process_deferred_inactive(struct mount *
 			MNT_ILOCK(mp);
 			continue;
 		}
-		
-		VNASSERT((vp->v_iflag & VI_DOINGINACT) == 0, vp,
-			 ("process_deferred_inactive: "
-			  "recursed on VI_DOINGINACT"));
-		vp->v_iflag |= VI_DOINGINACT;
-		vp->v_iflag &= ~VI_OWEINACT;
-		VI_UNLOCK(vp);
-		(void) VOP_INACTIVE(vp, td);
-		VI_LOCK(vp);
-		VNASSERT(vp->v_iflag & VI_DOINGINACT, vp,
-			 ("process_deferred_inactive: lost VI_DOINGINACT"));
+		vinactive(vp, td);
 		VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp,
 			 ("process_deferred_inactive: got VI_OWEINACT"));
-		vp->v_iflag &= ~VI_DOINGINACT;
 		VI_UNLOCK(vp);
 		VOP_UNLOCK(vp, 0);
 		vdrop(vp);



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