diff options
author | attilio <attilio@FreeBSD.org> | 2012-11-09 18:02:25 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-11-09 18:02:25 +0000 |
commit | d5d551ec46edfdd7b35884740863514cf342c207 (patch) | |
tree | 85566631342fad6e72bb3ce702047490a06985fb | |
parent | 6cb17a3f471ee1a94b7f2499509c2d5bd597f04e (diff) | |
download | FreeBSD-src-d5d551ec46edfdd7b35884740863514cf342c207.zip FreeBSD-src-d5d551ec46edfdd7b35884740863514cf342c207.tar.gz |
Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag.
Porters should refer to __FreeBSD_version 1000021 for this change as
it may have happened at the same timeframe.
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/fuse/fuse_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/nandfs/nandfs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/nfsclient/nfs_clvfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/pseudofs/pseudofs.c | 1 | ||||
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/udf/udf_vfsops.c | 3 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 3 | ||||
-rw-r--r-- | sys/gnu/fs/reiserfs/reiserfs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/kern/uipc_mqueue.c | 1 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 1 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/sys/mount.h | 2 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 4 |
21 files changed, 11 insertions, 35 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c index 0a8f135..2c7f423 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -1132,7 +1132,6 @@ zfs_domount(vfs_t *vfsp, char *osname) vfsp->vfs_data = zfsvfs; vfsp->mnt_flag |= MNT_LOCAL; - vfsp->mnt_kern_flag |= MNTK_MPSAFE; vfsp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; vfsp->mnt_kern_flag |= MNTK_SHARED_WRITES; vfsp->mnt_kern_flag |= MNTK_EXTENDED_SHARED; diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 7780b04..1865202 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -376,8 +376,7 @@ iso_mountfs(devvp, mp) mp->mnt_maxsymlinklen = 0; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); isomp->im_mountp = mp; isomp->im_dev = dev; diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index c0407eb..85ff158 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -131,8 +131,7 @@ devfs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; #ifdef MAC mp->mnt_flag |= MNT_MULTILABEL; #endif diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 576a1f59..147b9b8 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -665,8 +665,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp) * Initialize filesystem stat information in mount struct. */ MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); return (0); out: diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index dc88278..c3dbccf 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -107,9 +107,6 @@ fdesc_mount(struct mount *mp) VOP_UNLOCK(rvp, 0); /* XXX -- don't mark as local to work around fts() problems */ /*mp->mnt_flag |= MNT_LOCAL;*/ - MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_MPSAFE; - MNT_IUNLOCK(mp); vfs_getnewfsid(mp); vfs_mountedfrom(mp, "fdescfs"); diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 74e43f0..7c4578b 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -339,7 +339,6 @@ fuse_vfsop_mount(struct mount *mp) vfs_getnewfsid(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; if (subtype) { strlcat(mp->mnt_stat.f_fstypename, ".", MFSNAMELEN); strlcat(mp->mnt_stat.f_fstypename, subtype, MFSNAMELEN); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 7bdd2fa..e99fff3 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -760,7 +760,6 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp) mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); if (pmp->pm_flags & MSDOSFS_LARGEFS) diff --git a/sys/fs/nandfs/nandfs_vfsops.c b/sys/fs/nandfs/nandfs_vfsops.c index ba53546..9e3196e 100644 --- a/sys/fs/nandfs/nandfs_vfsops.c +++ b/sys/fs/nandfs/nandfs_vfsops.c @@ -1383,7 +1383,6 @@ nandfs_mountfs(struct vnode *devvp, struct mount *mp) nmp->nm_ronly = ronly; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); nmp->nm_nandfsdev = nandfsdev; /* Add our mountpoint */ diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 966688f..71791fa 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -1136,8 +1136,7 @@ nfs_mount(struct mount *mp) out: if (!error) { MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_NO_IOPF; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_NO_IOPF; MNT_IUNLOCK(mp); } return (error); diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 9c2851b..7d84d51 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -189,8 +189,7 @@ nullfs_mount(struct mount *mp) } MNT_ILOCK(mp); mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & - (MNTK_MPSAFE | MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED); + (MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED); mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT; MNT_IUNLOCK(mp); mp->mnt_data = xmp; diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 145aaef..d7894af 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -308,7 +308,6 @@ pfs_mount(struct pfs_info *pi, struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); mp->mnt_data = pi; vfs_getnewfsid(mp); diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 445112d..b2aa786 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -253,7 +253,6 @@ tmpfs_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); mp->mnt_data = tmp; diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index ddf3b99..8c44f48 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -355,8 +355,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED; MNT_IUNLOCK(mp); udfmp->im_mountp = mp; udfmp->im_dev = dev; diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 936df4c..c6586e2 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -266,11 +266,6 @@ unionfs_domount(struct mount *mp) ump->um_copymode = copymode; ump->um_whitemode = whitemode; - MNT_ILOCK(mp); - if ((lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE) && - (upperrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE)) - mp->mnt_kern_flag |= MNTK_MPSAFE; - MNT_IUNLOCK(mp); mp->mnt_data = ump; /* diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 36ca302..5076f16 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1867,8 +1867,7 @@ unionfs_lock(struct vop_lock1_args *ap) if ((revlock = unionfs_get_llt_revlock(vp, flags)) == 0) panic("unknown lock type: 0x%x", flags & LK_TYPE_MASK); - if ((mp->mnt_kern_flag & MNTK_MPSAFE) != 0 && - (vp->v_iflag & VI_OWEINACT) != 0) + if ((vp->v_iflag & VI_OWEINACT) != 0) flags |= LK_NOWAIT; /* diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c index 825111e..496a6ad 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c @@ -580,7 +580,6 @@ reiserfs_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); #if defined(si_mountpoint) devvp->v_rdev->si_mountpoint = mp; diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 81dec87..9da464c 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -582,7 +582,6 @@ mqfs_mount(struct mount *mp) mp->mnt_data = &mqfs_data; MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_MPSAFE; MNT_IUNLOCK(mp); vfs_getnewfsid(mp); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ac600de..454caee 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3110,7 +3110,6 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_SUSPEND); MNT_KERN_FLAG(MNTK_SUSPEND2); MNT_KERN_FLAG(MNTK_SUSPENDED); - MNT_KERN_FLAG(MNTK_MPSAFE); MNT_KERN_FLAG(MNTK_LOOKUP_SHARED); MNT_KERN_FLAG(MNTK_NOKNOTE); #undef MNT_KERN_FLAG diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 9172703..63b5772 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -1193,7 +1193,7 @@ nfs_mount(struct mount *mp) out: if (!error) { MNT_ILOCK(mp); - mp->mnt_kern_flag |= (MNTK_MPSAFE|MNTK_LOOKUP_SHARED); + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; MNT_IUNLOCK(mp); } return (error); diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 438a6a4..4d010ec 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -385,7 +385,7 @@ void __mnt_vnode_markerfree(struct vnode **mvp, struct mount *mp); #define MNTK_SUSPEND 0x08000000 /* request write suspension */ #define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ #define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ -#define MNTK_MPSAFE 0x20000000 /* Filesystem is MPSAFE. */ +#define MNTK_UNUSED25 0x20000000 /* --available-- */ #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ #define MNTK_NOKNOTE 0x80000000 /* Don't send KNOTEs from VOP hooks */ diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index cc8d826..cc54ece 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1063,8 +1063,8 @@ ffs_mountfs(devvp, mp, td) * Initialize filesystem stat information in mount struct. */ MNT_ILOCK(mp); - mp->mnt_kern_flag |= MNTK_MPSAFE | MNTK_LOOKUP_SHARED | - MNTK_EXTENDED_SHARED | MNTK_NO_IOPF; + mp->mnt_kern_flag |= MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED | + MNTK_NO_IOPF; MNT_IUNLOCK(mp); #ifdef UFS_EXTATTR #ifdef UFS_EXTATTR_AUTOSTART |