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.
This commit is contained in:
parent
372c8c7e5d
commit
bc2258da88
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user