Field "layerm_vfs" of "struct layer_mount" got superseded by "mnt_lower".

Adapt consumers and remove the now unused field.

Ride 7.99.68
This commit is contained in:
hannken 2017-04-11 07:51:37 +00:00
parent 2f4fa4f94f
commit 228d72edde
8 changed files with 31 additions and 35 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: layer.h,v 1.16 2014/05/28 10:51:20 hannken Exp $ */
/* $NetBSD: layer.h,v 1.17 2017/04/11 07:51:37 hannken Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -79,7 +79,6 @@ struct layer_args {
#ifdef _KERNEL
struct layer_mount {
struct mount *layerm_vfs;
struct vnode *layerm_rootvp; /* Ref to root layer_node */
u_int layerm_flags; /* mount point layer flags */
u_int layerm_size; /* size of fs's struct node */

View File

@ -1,4 +1,4 @@
/* $NetBSD: layer_vfsops.c,v 1.48 2017/03/30 09:16:52 hannken Exp $ */
/* $NetBSD: layer_vfsops.c,v 1.49 2017/04/11 07:51:37 hannken Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.48 2017/03/30 09:16:52 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.49 2017/04/11 07:51:37 hannken Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
@ -127,7 +127,7 @@ layerfs_start(struct mount *mp, int flags)
{
#ifdef notyet
return VFS_START(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, flags);
return VFS_START(mp->mnt_lower, flags);
#else
return 0;
#endif
@ -156,7 +156,7 @@ int
layerfs_quotactl(struct mount *mp, struct quotactl_args *args)
{
return VFS_QUOTACTL(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, args);
return VFS_QUOTACTL(mp->mnt_lower, args);
}
int
@ -169,7 +169,7 @@ layerfs_statvfs(struct mount *mp, struct statvfs *sbp)
if (sbuf == NULL) {
return ENOMEM;
}
error = VFS_STATVFS(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, sbuf);
error = VFS_STATVFS(mp->mnt_lower, sbuf);
if (error) {
goto done;
}
@ -249,7 +249,7 @@ layerfs_vget(struct mount *mp, ino_t ino, struct vnode **vpp)
struct vnode *vp;
int error;
error = VFS_VGET(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, ino, &vp);
error = VFS_VGET(mp->mnt_lower, ino, &vp);
if (error) {
*vpp = NULL;
return error;
@ -276,7 +276,7 @@ layerfs_fhtovp(struct mount *mp, struct fid *fidp, struct vnode **vpp)
struct vnode *vp;
int error;
error = VFS_FHTOVP(MOUNTTOLAYERMOUNT(mp)->layerm_vfs, fidp, &vp);
error = VFS_FHTOVP(mp->mnt_lower, fidp, &vp);
if (error) {
*vpp = NULL;
return error;
@ -381,12 +381,12 @@ int
layerfs_renamelock_enter(struct mount *mp)
{
return VFS_RENAMELOCK_ENTER(MOUNTTOLAYERMOUNT(mp)->layerm_vfs);
return VFS_RENAMELOCK_ENTER(mp->mnt_lower);
}
void
layerfs_renamelock_exit(struct mount *mp)
{
VFS_RENAMELOCK_EXIT(MOUNTTOLAYERMOUNT(mp)->layerm_vfs);
VFS_RENAMELOCK_EXIT(mp->mnt_lower);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: null.h,v 1.19 2010/07/02 03:16:01 rmind Exp $ */
/* $NetBSD: null.h,v 1.20 2017/04/11 07:51:37 hannken Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -83,7 +83,6 @@ struct null_args {
struct null_mount {
struct layer_mount lm; /* generic layerfs mount stuff */
};
#define nullm_vfs lm.layerm_vfs
#define nullm_rootvp lm.layerm_rootvp
#define nullm_export lm.layerm_export
#define nullm_flags lm.layerm_flags

View File

@ -1,4 +1,4 @@
/* $NetBSD: null_vfsops.c,v 1.93 2017/03/30 09:13:01 hannken Exp $ */
/* $NetBSD: null_vfsops.c,v 1.94 2017/04/11 07:51:37 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.93 2017/03/30 09:13:01 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.94 2017/04/11 07:51:37 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -140,9 +140,6 @@ nullfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
/* Create the mount point. */
nmp = kmem_zalloc(sizeof(struct null_mount), KM_SLEEP);
mp->mnt_data = nmp;
nmp->nullm_vfs = lowerrootvp->v_mount;
if (nmp->nullm_vfs->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
/*
* Make sure that the mount point is sufficiently initialized
@ -177,7 +174,10 @@ nullfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
UIO_USERSPACE, mp->mnt_op->vfs_name, mp, curlwp);
if (error)
return error;
mp->mnt_lower = nmp->nullm_vfs;
mp->mnt_lower = lowerrootvp->v_mount;
if (mp->mnt_lower->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: overlay.h,v 1.8 2008/06/28 01:34:06 rumble Exp $ */
/* $NetBSD: overlay.h,v 1.9 2017/04/11 07:51:37 hannken Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -86,7 +86,6 @@ struct overlay_args {
struct overlay_mount {
struct layer_mount lm; /* generic layerfs mount stuff */
};
#define ovm_vfs lm.layerm_vfs
#define ovm_rootvp lm.layerm_rootvp
#define ovm_export lm.layerm_export
#define ovm_flags lm.layerm_flags

View File

@ -1,4 +1,4 @@
/* $NetBSD: overlay_vfsops.c,v 1.66 2017/03/30 09:13:01 hannken Exp $ */
/* $NetBSD: overlay_vfsops.c,v 1.67 2017/04/11 07:51:37 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.66 2017/03/30 09:13:01 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.67 2017/04/11 07:51:37 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -149,9 +149,6 @@ ov_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
nmp = kmem_zalloc(sizeof(struct overlay_mount), KM_SLEEP);
mp->mnt_data = nmp;
nmp->ovm_vfs = lowerrootvp->v_mount;
if (nmp->ovm_vfs->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
/*
* Make sure that the mount point is sufficiently initialized
@ -191,7 +188,10 @@ ov_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
UIO_USERSPACE, mp->mnt_op->vfs_name, mp, l);
if (error)
return error;
mp->mnt_lower = nmp->ovm_vfs;
mp->mnt_lower = lowerrootvp->v_mount;
if (mp->mnt_lower->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
#ifdef OVERLAYFS_DIAGNOSTIC
printf("ov_mount: lower %s, alias at %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);

View File

@ -1,4 +1,4 @@
/* $NetBSD: umap.h,v 1.16 2008/06/28 01:34:06 rumble Exp $ */
/* $NetBSD: umap.h,v 1.17 2017/04/11 07:51:37 hannken Exp $ */
/*
* Copyright (c) 1992, 1993
@ -64,7 +64,6 @@ struct umap_mount {
u_long info_gmapdata[GMAPFILEENTRIES][2]; /*mapping data for
group mapping in ficus */
};
#define umapm_vfs lm.layerm_vfs
#define umapm_rootvp lm.layerm_rootvp
#define umapm_export lm.layerm_export
#define umapm_flags lm.layerm_flags

View File

@ -1,4 +1,4 @@
/* $NetBSD: umap_vfsops.c,v 1.98 2017/03/30 09:13:01 hannken Exp $ */
/* $NetBSD: umap_vfsops.c,v 1.99 2017/04/11 07:51:37 hannken Exp $ */
/*
* Copyright (c) 1992, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.98 2017/03/30 09:13:01 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.99 2017/04/11 07:51:37 hannken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -145,9 +145,6 @@ umapfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
amp = kmem_zalloc(sizeof(struct umap_mount), KM_SLEEP);
mp->mnt_data = amp;
amp->umapm_vfs = lowerrootvp->v_mount;
if (amp->umapm_vfs->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
/*
* Now copy in the number of entries and maps for umap mapping.
@ -226,7 +223,10 @@ umapfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
UIO_USERSPACE, mp->mnt_op->vfs_name, mp, l);
if (error)
return error;
mp->mnt_lower = amp->umapm_vfs;
mp->mnt_lower = lowerrootvp->v_mount;
if (mp->mnt_lower->mnt_flag & MNT_LOCAL)
mp->mnt_flag |= MNT_LOCAL;
#ifdef UMAPFS_DIAGNOSTIC
printf("umapfs_mount: lower %s, alias at %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);