mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
FreeBSD: Add support for lockless lookup
Authored-by: mjg <mjg@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10657
This commit is contained in:
@@ -161,6 +161,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
|
||||
vput(vp);
|
||||
return (error);
|
||||
}
|
||||
vn_seqc_write_begin(vp);
|
||||
VOP_UNLOCK1(vp);
|
||||
|
||||
/*
|
||||
@@ -213,6 +214,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
|
||||
VI_LOCK(vp);
|
||||
vp->v_iflag &= ~VI_MOUNT;
|
||||
VI_UNLOCK(vp);
|
||||
vn_seqc_write_end(vp);
|
||||
vput(vp);
|
||||
vfs_unbusy(mp);
|
||||
vfs_freeopts(mp->mnt_optnew);
|
||||
@@ -248,6 +250,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
|
||||
vfs_event_signal(NULL, VQ_MOUNT, 0);
|
||||
if (VFS_ROOT(mp, LK_EXCLUSIVE, &mvp))
|
||||
panic("mount: lost mount");
|
||||
vn_seqc_write_end(vp);
|
||||
VOP_UNLOCK1(vp);
|
||||
#if __FreeBSD_version >= 1300048
|
||||
vfs_op_exit(mp);
|
||||
|
||||
Reference in New Issue
Block a user