Module Name: src Committed By: hannken Date: Mon Mar 6 10:10:07 UTC 2017
Modified Files: src/sys/fs/union: union_vfsops.c src/sys/miscfs/nullfs: null_vfsops.c src/sys/miscfs/overlay: overlay_vfsops.c src/sys/miscfs/umapfs: umap_vfsops.c src/sys/sys: mount.h param.h Log Message: Add field "mnt_lower" to "struct mount" to track the file system a layered file system is mounted on. Welcome to 7.99.65 To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/fs/union/union_vfsops.c cvs rdiff -u -r1.91 -r1.92 src/sys/miscfs/nullfs/null_vfsops.c cvs rdiff -u -r1.64 -r1.65 src/sys/miscfs/overlay/overlay_vfsops.c cvs rdiff -u -r1.96 -r1.97 src/sys/miscfs/umapfs/umap_vfsops.c cvs rdiff -u -r1.220 -r1.221 src/sys/sys/mount.h cvs rdiff -u -r1.531 -r1.532 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/union/union_vfsops.c diff -u src/sys/fs/union/union_vfsops.c:1.76 src/sys/fs/union/union_vfsops.c:1.77 --- src/sys/fs/union/union_vfsops.c:1.76 Fri Feb 17 08:31:25 2017 +++ src/sys/fs/union/union_vfsops.c Mon Mar 6 10:10:07 2017 @@ -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> @@ -252,6 +252,8 @@ union_mount(struct mount *mp, const char if (error) goto bad; + mp->mnt_lower = um->um_uppervp->v_mount; + switch (um->um_op) { case UNMNT_ABOVE: cp = "<above>:"; Index: src/sys/miscfs/nullfs/null_vfsops.c diff -u src/sys/miscfs/nullfs/null_vfsops.c:1.91 src/sys/miscfs/nullfs/null_vfsops.c:1.92 --- src/sys/miscfs/nullfs/null_vfsops.c:1.91 Fri Feb 17 08:31:25 2017 +++ src/sys/miscfs/nullfs/null_vfsops.c Mon Mar 6 10:10:07 2017 @@ -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 @@ nullfs_mount(struct mount *mp, const cha 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); Index: src/sys/miscfs/overlay/overlay_vfsops.c diff -u src/sys/miscfs/overlay/overlay_vfsops.c:1.64 src/sys/miscfs/overlay/overlay_vfsops.c:1.65 --- src/sys/miscfs/overlay/overlay_vfsops.c:1.64 Fri Feb 17 08:31:25 2017 +++ src/sys/miscfs/overlay/overlay_vfsops.c Mon Mar 6 10:10:07 2017 @@ -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 @@ ov_mount(struct mount *mp, const char *p 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, Index: src/sys/miscfs/umapfs/umap_vfsops.c diff -u src/sys/miscfs/umapfs/umap_vfsops.c:1.96 src/sys/miscfs/umapfs/umap_vfsops.c:1.97 --- src/sys/miscfs/umapfs/umap_vfsops.c:1.96 Fri Feb 17 08:31:25 2017 +++ src/sys/miscfs/umapfs/umap_vfsops.c Mon Mar 6 10:10:07 2017 @@ -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 @@ umapfs_mount(struct mount *mp, const cha 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, Index: src/sys/sys/mount.h diff -u src/sys/sys/mount.h:1.220 src/sys/sys/mount.h:1.221 --- src/sys/sys/mount.h:1.220 Wed Jan 11 09:07:57 2017 +++ src/sys/sys/mount.h Mon Mar 6 10:10:07 2017 @@ -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 @@ struct mount { 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 */ Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.531 src/sys/sys/param.h:1.532 --- src/sys/sys/param.h:1.531 Wed Mar 1 10:44:47 2017 +++ src/sys/sys/param.h Mon Mar 6 10:10:07 2017 @@ -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__)