Skip to content

Commit

Permalink
librbd: ignore ENOENT error when removing image from mirror directory
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/16348
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4255afd)
  • Loading branch information
Jason Dillaman authored and ldachary committed Jun 30, 2016
1 parent 38a2542 commit 415ea77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librbd/internal.cc
Expand Up @@ -395,7 +395,7 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,

if (remove) {
r = cls_client::mirror_image_remove(&ictx->md_ctx, ictx->id);
if (r < 0) {
if (r < 0 && r != -ENOENT) {
lderr(cct) << "failed to remove image from mirroring directory: "
<< cpp_strerror(r) << dendl;
return r;
Expand Down Expand Up @@ -1827,7 +1827,7 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
}
} else if (mirror_mode == RBD_MIRROR_MODE_POOL) {
r = cls_client::mirror_image_remove(&ictx->md_ctx, ictx->id);
if (r < 0) {
if (r < 0 && r != -ENOENT) {
lderr(cct) << "failed to remove image from mirroring directory: "
<< cpp_strerror(r) << dendl;
return r;
Expand Down

0 comments on commit 415ea77

Please sign in to comment.