diff options
author | Jason Dillaman <dillaman@redhat.com> | 2015-03-16 18:40:49 -0400 |
---|---|---|
committer | Jason Dillaman <dillaman@redhat.com> | 2015-04-01 15:54:51 -0400 |
commit | 57d2781da8ed6159397f0832935844c690033699 (patch) | |
tree | bfc67735619703190b0f36f34f3a2a2bb3814ef7 | |
parent | 572a2f5707f91f11c3ccaeca3ae88d8914d3dbc2 (diff) | |
download | ceph-57d2781da8ed6159397f0832935844c690033699.tar.gz |
librbd: snap_remove should ignore -ENOENT errors
If the attempt to deregister the snapshot from the parent
image fails with -ENOENT, ignore the error as it is safe
to assume that the child is not associated with the parent.
Fixes: #11113
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit cf8094942ccdba831e03e5a79451cfa5d78a135f)
-rw-r--r-- | src/librbd/internal.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 2651ba6208f..c356c79fe3b 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -584,8 +584,11 @@ namespace librbd { (scan_for_parents(ictx, our_pspec, snap_id) == -ENOENT)) { r = cls_client::remove_child(&ictx->md_ctx, RBD_CHILDREN, our_pspec, ictx->id); - if (r < 0) + if (r < 0 && r != -ENOENT) { + lderr(ictx->cct) << "snap_remove: failed to deregister from parent " + "image" << dendl; return r; + } } } |