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 <david.chen@osnexus.com>
Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4023
Issue #4024
This commit is contained in:
Boris Protopopov
2016-01-05 15:47:58 -05:00
committed by Brian Behlendorf
parent d88895a069
commit e3a07cd033
3 changed files with 157 additions and 55 deletions
+5 -3
View File
@@ -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
}