]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: filter expected error codes from is_exclusive_lock_owner 16187/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 5 Jun 2017 12:17:05 +0000 (08:17 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 6 Jul 2017 18:31:30 +0000 (20:31 +0200)
Fixes: http://tracker.ceph.com/issues/20182
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit d4daaf54e6bc42cd4fb2111ea20b2042941b0c31)

src/librbd/internal.cc

index f53a81edc259e1eefcd0c946407878e0b2a61af0..5cc58cc26df9e55abd357170dd6ca3d2172a40af 100644 (file)
@@ -1451,7 +1451,9 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
     // 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;
     }