Date: Mon, 16 May 2016 07:23:24 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299913 - head/sys/kern Message-ID: <201605160723.u4G7NOBU078895@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon May 16 07:23:24 2016 New Revision: 299913 URL: https://svnweb.freebsd.org/changeset/base/299913 Log: dounmount: do not call mountcheckdirs() for mounts with MNT_IGNORE This is a bit hackish, but the flag is currently set only for ZFS snapshots mounted under .zfs. mountcheckdirs() can change cdir/rdir references to a covered vnode. But for the said snapshots the covered vnode is really ephemeral and it must never be accessed (except for a few specific cases). To do: consider removing mountcheckdirs() entirely MFC after: 5 days Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Mon May 16 07:19:33 2016 (r299912) +++ head/sys/kern/vfs_mount.c Mon May 16 07:23:24 2016 (r299913) @@ -1298,7 +1298,8 @@ dounmount(struct mount *mp, int flags, s */ if ((flags & MNT_FORCE) && VFS_ROOT(mp, LK_EXCLUSIVE, &fsrootvp) == 0) { - if (mp->mnt_vnodecovered != NULL) + if (mp->mnt_vnodecovered != NULL && + (mp->mnt_flag & MNT_IGNORE) == 0) mountcheckdirs(fsrootvp, mp->mnt_vnodecovered); if (fsrootvp == rootvnode) { vrele(rootvnode); @@ -1319,7 +1320,8 @@ dounmount(struct mount *mp, int flags, s if (error && error != ENXIO) { if ((flags & MNT_FORCE) && VFS_ROOT(mp, LK_EXCLUSIVE, &fsrootvp) == 0) { - if (mp->mnt_vnodecovered != NULL) + if (mp->mnt_vnodecovered != NULL && + (mp->mnt_flag & MNT_IGNORE) == 0) mountcheckdirs(mp->mnt_vnodecovered, fsrootvp); if (rootvnode == NULL) { rootvnode = fsrootvp;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605160723.u4G7NOBU078895>