diff options
author | Matthew Macy <[email protected]> | 2020-04-17 09:30:26 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-17 09:30:26 -0700 |
commit | c614fd6e12c0fe2636a82b341e9ab9d150ee3c8a (patch) | |
tree | e66542105ae17f85a9b8ecc901fe31fcc05f7daa /include | |
parent | 9249f1272ec08316f4482cba145b42ba935d3b02 (diff) |
Use new FreeBSD API to largely eliminate object locking
Propagate changes in HEAD that mostly eliminate object locking.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #10205
Diffstat (limited to 'include')
-rw-r--r-- | include/os/freebsd/spl/sys/vm.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/os/freebsd/spl/sys/vm.h b/include/os/freebsd/spl/sys/vm.h index 07ee6bc19..7b3830be8 100644 --- a/include/os/freebsd/spl/sys/vm.h +++ b/include/os/freebsd/spl/sys/vm.h @@ -41,6 +41,22 @@ void zfs_vmobject_assert_wlocked(vm_object_t object); void zfs_vmobject_wlock(vm_object_t object); void zfs_vmobject_wunlock(vm_object_t object); +#if __FreeBSD_version >= 1300081 +#define zfs_vmobject_assert_wlocked_12(x) +#define zfs_vmobject_wlock_12(x) +#define zfs_vmobject_wunlock_12(x) +#else +#define zfs_vmobject_assert_wlocked_12(x) \ + zfs_vmobject_assert_wlocked((x)) +#define zfs_vmobject_wlock_12(x) \ + zfs_vmobject_wlock(x) +#define zfs_vmobject_wunlock_12(x) \ + zfs_vmobject_wunlock(x) +#define vm_page_grab_unlocked(obj, idx, flags) \ + vm_page_grab((obj), (idx), (flags)) +#define vm_page_grab_valid_unlocked(m, obj, idx, flags) \ + vm_page_grab_valid((m), (obj), (idx), (flags)) +#endif static inline caddr_t zfs_map_page(vm_page_t pp, struct sf_buf **sfp) { |