summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBoris Protopopov <[email protected]>2016-01-05 15:47:58 -0500
committerBrian Behlendorf <[email protected]>2016-05-17 10:40:30 -0700
commite3a07cd033920c2266a1ffdb8cfae951dfee3bf4 (patch)
tree9dc8ffc81a2ab723bb6988b002318ecc727afaa7 /include
parentd88895a069765bc3c6119ac1a3c8ea9edec7a370 (diff)
Use zfs range locks in ztest
The zfs range lock interface no longer tightly depends on a znode_t and therefore can be used in ztest. This allows the previous ztest specific implementation to be removed, and for additional test coverage of the shared version. Signed-off-by: Chunwei Chen <[email protected]> Signed-off-by: Boris Protopopov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #4023 Issue #4024
Diffstat (limited to 'include')
-rw-r--r--include/sys/zfs_rlock.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/sys/zfs_rlock.h b/include/sys/zfs_rlock.h
index 5322f3bc7..5373f0d57 100644
--- a/include/sys/zfs_rlock.h
+++ b/include/sys/zfs_rlock.h
@@ -30,11 +30,14 @@
extern "C" {
#endif
-#ifdef _KERNEL
-
#include <sys/list.h>
#include <sys/avl.h>
+
+#ifdef _KERNEL
#include <sys/condvar.h>
+#else
+#include <sys/zfs_context.h>
+#endif
typedef enum {
RL_READER,
@@ -106,7 +109,6 @@ zfs_rlock_destroy(zfs_rlock_t *zrl)
avl_destroy(&zrl->zr_avl);
mutex_destroy(&zrl->zr_mutex);
}
-#endif /* _KERNEL */
#ifdef __cplusplus
}