Source-Changes-HG archive

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

[src/trunk]: src/sys Add field "mnt_lower" to "struct mount" to track the fil...



details:   https://anonhg.NetBSD.org/src/rev/3fb948f54aab
branches:  trunk
changeset: 822185:3fb948f54aab
user:      hannken <hannken%NetBSD.org@localhost>
date:      Mon Mar 06 10:10:07 2017 +0000

description:
Add field "mnt_lower" to "struct mount" to track the file system
a layered file system is mounted on.

Welcome to 7.99.65

diffstat:

 sys/fs/union/union_vfsops.c         |  6 ++++--
 sys/miscfs/nullfs/null_vfsops.c     |  5 +++--
 sys/miscfs/overlay/overlay_vfsops.c |  5 +++--
 sys/miscfs/umapfs/umap_vfsops.c     |  5 +++--
 sys/sys/mount.h                     |  3 ++-
 sys/sys/param.h                     |  4 ++--
 6 files changed, 17 insertions(+), 11 deletions(-)

diffs (140 lines):

diff -r 6eaaffc9b0c1 -r 3fb948f54aab sys/fs/union/union_vfsops.c
--- a/sys/fs/union/union_vfsops.c       Mon Mar 06 10:08:49 2017 +0000
+++ b/sys/fs/union/union_vfsops.c       Mon Mar 06 10:10:07 2017 +0000
@@ -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 @@
        if (error)
                goto bad;
 
+       mp->mnt_lower = um->um_uppervp->v_mount;
+
        switch (um->um_op) {
        case UNMNT_ABOVE:
                cp = "<above>:";
diff -r 6eaaffc9b0c1 -r 3fb948f54aab sys/miscfs/nullfs/null_vfsops.c
--- a/sys/miscfs/nullfs/null_vfsops.c   Mon Mar 06 10:08:49 2017 +0000
+++ b/sys/miscfs/nullfs/null_vfsops.c   Mon Mar 06 10:10:07 2017 +0000
@@ -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);
 
diff -r 6eaaffc9b0c1 -r 3fb948f54aab sys/miscfs/overlay/overlay_vfsops.c
--- a/sys/miscfs/overlay/overlay_vfsops.c       Mon Mar 06 10:08:49 2017 +0000
+++ b/sys/miscfs/overlay/overlay_vfsops.c       Mon Mar 06 10:10:07 2017 +0000
@@ -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,
diff -r 6eaaffc9b0c1 -r 3fb948f54aab sys/miscfs/umapfs/umap_vfsops.c
--- a/sys/miscfs/umapfs/umap_vfsops.c   Mon Mar 06 10:08:49 2017 +0000
+++ b/sys/miscfs/umapfs/umap_vfsops.c   Mon Mar 06 10:10:07 2017 +0000
@@ -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,
diff -r 6eaaffc9b0c1 -r 3fb948f54aab sys/sys/mount.h
--- a/sys/sys/mount.h   Mon Mar 06 10:08:49 2017 +0000
+++ b/sys/sys/mount.h   Mon Mar 06 10:10:07 2017 +0000
@@ -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 */
diff -r 6eaaffc9b0c1 -r 3fb948f54aab sys/sys/param.h
--- a/sys/sys/param.h   Mon Mar 06 10:08:49 2017 +0000
+++ b/sys/sys/param.h   Mon Mar 06 10:10:07 2017 +0000
@@ -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__)



Home | Main Index | Thread Index | Old Index