Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Restrict vgone() to suspended file systems only.



details:   https://anonhg.NetBSD.org/src/rev/cb353d3331a9
branches:  trunk
changeset: 824228:cb353d3331a9
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sun May 28 16:39:41 2017 +0000

description:
Restrict vgone() to suspended file systems only.

Welcome to 7.99.75, old file system modules would cause a diagnostic
assertion with new kernel.

diffstat:

 share/man/man9/vnode.9 |  7 +++++--
 sys/kern/vfs_vnode.c   |  7 +++++--
 sys/sys/param.h        |  4 ++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diffs (74 lines):

diff -r 616a1f3c91c0 -r cb353d3331a9 share/man/man9/vnode.9
--- a/share/man/man9/vnode.9    Sun May 28 16:38:55 2017 +0000
+++ b/share/man/man9/vnode.9    Sun May 28 16:39:41 2017 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: vnode.9,v 1.79 2017/01/23 11:49:03 abhinav Exp $
+.\"     $NetBSD: vnode.9,v 1.80 2017/05/28 16:39:41 hannken Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 11, 2017
+.Dd May 28, 2017
 .Dt VNODE 9
 .Os
 .Sh NAME
@@ -617,6 +617,9 @@
 Eliminate all activity associated with the unlocked vnode
 .Fa vp
 in preparation for recycling.
+This operation is restricted to suspended file systems.
+See
+.Xr vfs_suspend 9 .
 .It Fn vgonel "vp" "p"
 Eliminate all activity associated with the locked vnode
 .Fa vp
diff -r 616a1f3c91c0 -r cb353d3331a9 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c      Sun May 28 16:38:55 2017 +0000
+++ b/sys/kern/vfs_vnode.c      Sun May 28 16:39:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_vnode.c,v 1.92 2017/05/28 16:35:47 hannken Exp $   */
+/*     $NetBSD: vfs_vnode.c,v 1.93 2017/05/28 16:39:41 hannken Exp $   */
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.92 2017/05/28 16:35:47 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.93 2017/05/28 16:39:41 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1018,6 +1018,9 @@
 vgone(vnode_t *vp)
 {
 
+       KASSERT((vp->v_mount->mnt_iflag & IMNT_HAS_TRANS) == 0 ||
+           fstrans_is_owner(vp->v_mount));
+
        vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
        mutex_enter(vp->v_interlock);
        VSTATE_WAIT_STABLE(vp);
diff -r 616a1f3c91c0 -r cb353d3331a9 sys/sys/param.h
--- a/sys/sys/param.h   Sun May 28 16:38:55 2017 +0000
+++ b/sys/sys/param.h   Sun May 28 16:39:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.541 2017/05/26 14:22:53 riastradh Exp $    */
+/*     $NetBSD: param.h,v 1.542 2017/05/28 16:39:42 hannken Exp $      */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *     2.99.9          (299000900)
  */
 
-#define        __NetBSD_Version__      799007400       /* NetBSD 7.99.74 */
+#define        __NetBSD_Version__      799007500       /* NetBSD 7.99.75 */
 
 #define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
     (m) * 1000000) + (p) * 100) <= __NetBSD_Version__)



Home | Main Index | Thread Index | Old Index