Skip to content

Commit

Permalink
librbd: filter expected error codes from is_exclusive_lock_owner
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/20182
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit d4daaf5)
  • Loading branch information
Jason Dillaman authored and smithfarm committed Jul 6, 2017
1 parent e12eae9 commit 18f1830
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librbd/internal.cc
Expand Up @@ -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;
}

Expand Down

0 comments on commit 18f1830

Please sign in to comment.