From 1c943451031b3c437110ecbb2f6a56d6ae0caa9f Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Thu, 21 Jan 2021 23:20:14 +0000 Subject: [PATCH] FreeBSD: upstream changes to VFS interface Set VIRF_MOUNTPOINT flag on snapshot mountpoint. Authored-by: Mateusz Guzik Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #11458 --- module/os/freebsd/spl/spl_vfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/os/freebsd/spl/spl_vfs.c b/module/os/freebsd/spl/spl_vfs.c index 991a11fe2..09c840126 100644 --- a/module/os/freebsd/spl/spl_vfs.c +++ b/module/os/freebsd/spl/spl_vfs.c @@ -240,9 +240,11 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath, #endif VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; - VI_UNLOCK(vp); - +#ifdef VIRF_MOUNTPOINT + vn_irflag_set_locked(vp, VIRF_MOUNTPOINT); +#endif vp->v_mountedhere = mp; + VI_UNLOCK(vp); /* Put the new filesystem on the mount list. */ mtx_lock(&mountlist_mtx); TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list);