From d4daaf54e6bc42cd4fb2111ea20b2042941b0c31 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 5 Jun 2017 08:17:05 -0400 Subject: [PATCH] librbd: filter expected error codes from is_exclusive_lock_owner Fixes: http://tracker.ceph.com/issues/20182 Signed-off-by: Jason Dillaman --- src/librbd/internal.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 40931127bd1..c803ed54215 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1132,7 +1132,9 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) { // might have been blacklisted by peer -- ensure we still own // the lock by pinging the OSD int r = ictx->exclusive_lock->assert_header_locked(); - if (r < 0) { + if (r == -EBUSY || r == -ENOENT) { + return 0; + } else if (r < 0) { return r; } -- 2.47.3