mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
Merge pull request #4246 from ceph/wip-11113-hammer
librbd: snap_remove should ignore -ENOENT errors
This commit is contained in:
commit
557715049a
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1426,6 +1429,9 @@ reprotect_and_return_err:
|
||||
|
||||
RWLock::RLocker l(ictx->snap_lock);
|
||||
RWLock::RLocker l2(ictx->parent_lock);
|
||||
if (ictx->parent == NULL) {
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
parent_spec parent_spec;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user