Mon Mar 6 10:10:07 2017 UTC ()
Add field "mnt_lower" to "struct mount" to track the file system
a layered file system is mounted on.

Welcome to 7.99.65


(hannken)
diff -r1.76 -r1.77 src/sys/fs/union/union_vfsops.c
diff -r1.91 -r1.92 src/sys/miscfs/nullfs/null_vfsops.c
diff -r1.64 -r1.65 src/sys/miscfs/overlay/overlay_vfsops.c
diff -r1.96 -r1.97 src/sys/miscfs/umapfs/umap_vfsops.c
diff -r1.220 -r1.221 src/sys/sys/mount.h
diff -r1.531 -r1.532 src/sys/sys/param.h

cvs diff -r1.76 -r1.77 src/sys/fs/union/union_vfsops.c (expand / switch to context diff)
--- src/sys/fs/union/union_vfsops.c 2017/02/17 08:31:25 1.76
+++ src/sys/fs/union/union_vfsops.c 2017/03/06 10:10:07 1.77
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vfsops.c,v 1.76 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: union_vfsops.c,v 1.77 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.76 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.77 2017/03/06 10:10:07 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -251,6 +251,8 @@
 	    mp->mnt_op->vfs_name, mp, l);
 	if (error)
 		goto bad;
+
+	mp->mnt_lower = um->um_uppervp->v_mount;
 
 	switch (um->um_op) {
 	case UNMNT_ABOVE:

cvs diff -r1.91 -r1.92 src/sys/miscfs/nullfs/null_vfsops.c (expand / switch to context diff)
--- src/sys/miscfs/nullfs/null_vfsops.c 2017/02/17 08:31:25 1.91
+++ src/sys/miscfs/nullfs/null_vfsops.c 2017/03/06 10:10:07 1.92
@@ -1,4 +1,4 @@
-/*	$NetBSD: null_vfsops.c,v 1.91 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: null_vfsops.c,v 1.92 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.91 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.92 2017/03/06 10:10:07 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -170,6 +170,7 @@
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->nullm_rootvp = vp;
+	mp->mnt_lower = nmp->nullm_vfs;
 	mp->mnt_iflag |= IMNT_MPSAFE;
 	VOP_UNLOCK(vp);
 

cvs diff -r1.64 -r1.65 src/sys/miscfs/overlay/overlay_vfsops.c (expand / switch to context diff)
--- src/sys/miscfs/overlay/overlay_vfsops.c 2017/02/17 08:31:25 1.64
+++ src/sys/miscfs/overlay/overlay_vfsops.c 2017/03/06 10:10:07 1.65
@@ -1,4 +1,4 @@
-/*	$NetBSD: overlay_vfsops.c,v 1.64 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: overlay_vfsops.c,v 1.65 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 National Aeronautics & Space Administration
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.64 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.65 2017/03/06 10:10:07 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -185,6 +185,7 @@
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->ovm_rootvp = vp;
+	mp->mnt_lower = nmp->ovm_vfs;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->la.target,

cvs diff -r1.96 -r1.97 src/sys/miscfs/umapfs/umap_vfsops.c (expand / switch to context diff)
--- src/sys/miscfs/umapfs/umap_vfsops.c 2017/02/17 08:31:25 1.96
+++ src/sys/miscfs/umapfs/umap_vfsops.c 2017/03/06 10:10:07 1.97
@@ -1,4 +1,4 @@
-/*	$NetBSD: umap_vfsops.c,v 1.96 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: umap_vfsops.c,v 1.97 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.96 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.97 2017/03/06 10:10:07 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -220,6 +220,7 @@
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	amp->umapm_rootvp = vp;
+	mp->mnt_lower = amp->umapm_vfs;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->umap_target,

cvs diff -r1.220 -r1.221 src/sys/sys/mount.h (expand / switch to context diff)
--- src/sys/sys/mount.h 2017/01/11 09:07:57 1.220
+++ src/sys/sys/mount.h 2017/03/06 10:10:07 1.221
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.h,v 1.220 2017/01/11 09:07:57 hannken Exp $	*/
+/*	$NetBSD: mount.h,v 1.221 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1989, 1991, 1993
@@ -113,6 +113,7 @@
 	TAILQ_HEAD(, vnode_impl) mnt_vnodelist;	/* list of vnodes this mount */
 	struct vfsops	*mnt_op;		/* operations on fs */
 	struct vnode	*mnt_vnodecovered;	/* vnode we mounted on */
+	struct mount	*mnt_lower;		/* fs mounted on */
 	int		mnt_synclist_slot;	/* synclist slot index */
 	void		*mnt_transinfo;		/* for FS-internal use */
 	void		*mnt_data;		/* private data */

cvs diff -r1.531 -r1.532 src/sys/sys/param.h (expand / switch to context diff)
--- src/sys/sys/param.h 2017/03/01 10:44:47 1.531
+++ src/sys/sys/param.h 2017/03/06 10:10:07 1.532
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.531 2017/03/01 10:44:47 hannken Exp $	*/
+/*	$NetBSD: param.h,v 1.532 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	799006400	/* NetBSD 7.99.64 */
+#define	__NetBSD_Version__	799006500	/* NetBSD 7.99.65 */
 
 #define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
     (m) * 1000000) + (p) * 100) <= __NetBSD_Version__)