From 2e8bb1ebfbbf36b60b79089f9f9fb815771bb681 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 22 Jan 2015 01:10:30 -0500 Subject: [PATCH] test/librbd/fsx.c: disable RBD exclusive locking for krbd Until the kernel supports RBD exclusive locking, this test has been updated to disable the new feature. Fixes: #10614 Signed-off-by: Jason Dillaman --- src/test/librbd/fsx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test/librbd/fsx.c b/src/test/librbd/fsx.c index 4acb512efa0..eccc9df2656 100644 --- a/src/test/librbd/fsx.c +++ b/src/test/librbd/fsx.c @@ -435,7 +435,7 @@ librbd_resize(struct rbd_ctx *ctx, uint64_t size) int __librbd_clone(struct rbd_ctx *ctx, const char *src_snapname, const char *dst_imagename, int *order, int stripe_unit, - int stripe_count) + int stripe_count, bool krbd) { int ret; @@ -453,8 +453,12 @@ __librbd_clone(struct rbd_ctx *ctx, const char *src_snapname, return ret; } + uint64_t features = RBD_FEATURES_ALL; + if (krbd) { + features &= ~RBD_FEATURE_EXCLUSIVE_LOCK; + } ret = rbd_clone2(ioctx, ctx->name, src_snapname, ioctx, - dst_imagename, RBD_FEATURES_ALL, order, + dst_imagename, features, order, stripe_unit, stripe_count); if (ret < 0) { prt("rbd_clone2(%s@%s -> %s) failed\n", ctx->name, @@ -471,7 +475,7 @@ librbd_clone(struct rbd_ctx *ctx, const char *src_snapname, int stripe_count) { return __librbd_clone(ctx, src_snapname, dst_imagename, order, - stripe_unit, stripe_count); + stripe_unit, stripe_count, false); } int @@ -692,7 +696,7 @@ krbd_clone(struct rbd_ctx *ctx, const char *src_snapname, return ret; return __librbd_clone(ctx, src_snapname, dst_imagename, order, - stripe_unit, stripe_count); + stripe_unit, stripe_count, true); } int