diff options
author | Matthew Macy <[email protected]> | 2020-08-05 10:19:51 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-05 10:19:51 -0700 |
commit | 1b376d176ead7651ffde83d319edcc1bcc65da55 (patch) | |
tree | f0de56259952273194336cbce7f6f7f5eaed27f3 /include/os/freebsd | |
parent | 22dcf89181bdb178173ebc73c1345199acc22860 (diff) |
FreeBSD: Add support for lockless lookup
Authored-by: mjg <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #10657
Diffstat (limited to 'include/os/freebsd')
-rw-r--r-- | include/os/freebsd/spl/sys/ccompat.h | 15 | ||||
-rw-r--r-- | include/os/freebsd/zfs/sys/zfs_znode_impl.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/os/freebsd/spl/sys/ccompat.h b/include/os/freebsd/spl/sys/ccompat.h index 6c8767635..59abe921d 100644 --- a/include/os/freebsd/spl/sys/ccompat.h +++ b/include/os/freebsd/spl/sys/ccompat.h @@ -55,6 +55,21 @@ #else #define getnewvnode_reserve_() getnewvnode_reserve(1) #endif + +#if __FreeBSD_version < 1300102 +#define ASSERT_VOP_IN_SEQC(zp) +#define MNTK_FPLOOKUP 0 +#define vn_seqc_write_begin(vp) +#define vn_seqc_write_end(vp) + +#ifndef VFS_SMR_DECLARE +#define VFS_SMR_DECLARE +#endif +#ifndef VFS_SMR_ZONE_SET +#define VFS_SMR_ZONE_SET(zone) +#endif +#endif + struct hlist_node { struct hlist_node *next, **pprev; }; diff --git a/include/os/freebsd/zfs/sys/zfs_znode_impl.h b/include/os/freebsd/zfs/sys/zfs_znode_impl.h index c04304675..b1fe4aa86 100644 --- a/include/os/freebsd/zfs/sys/zfs_znode_impl.h +++ b/include/os/freebsd/zfs/sys/zfs_znode_impl.h @@ -99,6 +99,7 @@ extern minor_t zfsdev_minor_alloc(void); #define ZTOV(ZP) ((ZP)->z_vnode) #define ZTOI(ZP) ((ZP)->z_vnode) #define VTOZ(VP) ((struct znode *)(VP)->v_data) +#define VTOZ_SMR(VP) ((znode_t *)vn_load_v_data_smr(VP)) #define ITOZ(VP) ((struct znode *)(VP)->v_data) #define zhold(zp) vhold(ZTOV((zp))) #define zrele(zp) vrele(ZTOV((zp))) |