Date: Tue, 3 Sep 2019 19:30:02 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r351777 - in stable/12/sys: kern sys ufs/ffs Message-ID: <201909031930.x83JU2II057631@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Sep 3 19:30:02 2019 New Revision: 351777 URL: https://svnweb.freebsd.org/changeset/base/351777 Log: MFC r351435: De-commision the MNTK_NOINSMNTQ kernel mount flag. Modified: stable/12/sys/kern/vfs_mount.c stable/12/sys/kern/vfs_subr.c stable/12/sys/sys/mount.h stable/12/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_mount.c ============================================================================== --- stable/12/sys/kern/vfs_mount.c Tue Sep 3 19:27:59 2019 (r351776) +++ stable/12/sys/kern/vfs_mount.c Tue Sep 3 19:30:02 2019 (r351777) @@ -1382,14 +1382,13 @@ dounmount(struct mount *mp, int flags, struct thread * dounmount_cleanup(mp, coveredvp, 0); return (EBUSY); } - mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ; + mp->mnt_kern_flag |= MNTK_UNMOUNT; if (flags & MNT_NONBUSY) { MNT_IUNLOCK(mp); error = vfs_check_usecounts(mp); MNT_ILOCK(mp); if (error != 0) { - dounmount_cleanup(mp, coveredvp, MNTK_UNMOUNT | - MNTK_NOINSMNTQ); + dounmount_cleanup(mp, coveredvp, MNTK_UNMOUNT); return (error); } } @@ -1451,7 +1450,6 @@ dounmount(struct mount *mp, int flags, struct thread * */ if (error && error != ENXIO) { MNT_ILOCK(mp); - mp->mnt_kern_flag &= ~MNTK_NOINSMNTQ; if ((mp->mnt_flag & MNT_RDONLY) == 0) { MNT_IUNLOCK(mp); vfs_allocate_syncvnode(mp); Modified: stable/12/sys/kern/vfs_subr.c ============================================================================== --- stable/12/sys/kern/vfs_subr.c Tue Sep 3 19:27:59 2019 (r351776) +++ stable/12/sys/kern/vfs_subr.c Tue Sep 3 19:30:02 2019 (r351777) @@ -1687,7 +1687,7 @@ insmntque1(struct vnode *vp, struct mount *mp, */ MNT_ILOCK(mp); VI_LOCK(vp); - if (((mp->mnt_kern_flag & MNTK_NOINSMNTQ) != 0 && + if (((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 && ((mp->mnt_kern_flag & MNTK_UNMOUNTF) != 0 || mp->mnt_nvnodelistsize == 0)) && (vp->v_vflag & VV_FORCEINSMQ) == 0) { @@ -3761,7 +3761,6 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_UNMOUNTF); MNT_KERN_FLAG(MNTK_ASYNC); MNT_KERN_FLAG(MNTK_SOFTDEP); - MNT_KERN_FLAG(MNTK_NOINSMNTQ); MNT_KERN_FLAG(MNTK_DRAINING); MNT_KERN_FLAG(MNTK_REFEXPIRE); MNT_KERN_FLAG(MNTK_EXTENDED_SHARED); Modified: stable/12/sys/sys/mount.h ============================================================================== --- stable/12/sys/sys/mount.h Tue Sep 3 19:27:59 2019 (r351776) +++ stable/12/sys/sys/mount.h Tue Sep 3 19:30:02 2019 (r351777) @@ -368,23 +368,20 @@ void __mnt_vnode_markerfree_active(struct vno /* * Internal filesystem control flags stored in mnt_kern_flag. * - * MNTK_UNMOUNT locks the mount entry so that name lookup cannot proceed - * past the mount point. This keeps the subtree stable during mounts - * and unmounts. + * MNTK_UNMOUNT locks the mount entry so that name lookup cannot + * proceed past the mount point. This keeps the subtree stable during + * mounts and unmounts. When non-forced unmount flushes all vnodes + * from the mp queue, the MNTK_UNMOUNT flag prevents insmntque() from + * queueing new vnodes. * * MNTK_UNMOUNTF permits filesystems to detect a forced unmount while * dounmount() is still waiting to lock the mountpoint. This allows * the filesystem to cancel operations that might otherwise deadlock * with the unmount attempt (used by NFS). - * - * MNTK_NOINSMNTQ is strict subset of MNTK_UNMOUNT. They are separated - * to allow for failed unmount attempt to restore the syncer vnode for - * the mount. */ #define MNTK_UNMOUNTF 0x00000001 /* forced unmount in progress */ #define MNTK_ASYNC 0x00000002 /* filtered async flag */ #define MNTK_SOFTDEP 0x00000004 /* async disabled by softdep */ -#define MNTK_NOINSMNTQ 0x00000008 /* insmntque is not allowed */ #define MNTK_DRAINING 0x00000010 /* lock draining is happening */ #define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ #define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ Modified: stable/12/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_softdep.c Tue Sep 3 19:27:59 2019 (r351776) +++ stable/12/sys/ufs/ffs/ffs_softdep.c Tue Sep 3 19:30:02 2019 (r351777) @@ -2016,8 +2016,6 @@ retry_flush: if (oldmnt->mnt_kern_flag & MNTK_UNMOUNT) { retry = 0; MNT_ILOCK(oldmnt); - KASSERT((oldmnt->mnt_kern_flag & MNTK_NOINSMNTQ) != 0, - ("softdep_flushfiles: !MNTK_NOINSMNTQ")); morework = oldmnt->mnt_nvnodelistsize > 0; #ifdef QUOTA ump = VFSTOUFS(oldmnt);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909031930.x83JU2II057631>