mirror of
https://github.com/ceph/ceph
synced 2025-01-15 07:23:16 +00:00
rbd-mirror: image deleter now handles clone v2
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
parent
01198184db
commit
fb62296f6e
@ -117,6 +117,14 @@ void RemoveRequest<I>::remove_image() {
|
||||
template <typename I>
|
||||
void RemoveRequest<I>::handle_remove_image(int r) {
|
||||
dout(10) << "r=" << r << dendl;
|
||||
if (r == -ENOTEMPTY) {
|
||||
// image must have clone v2 snapshot still associated to child
|
||||
dout(10) << "snapshots still in-use" << dendl;
|
||||
*m_error_result = ERROR_RESULT_RETRY_IMMEDIATELY;
|
||||
finish(-EBUSY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (r < 0 && r != -ENOENT) {
|
||||
derr << "error removing image " << m_image_id << " "
|
||||
<< "(" << m_image_id << ") from local pool: "
|
||||
|
@ -225,7 +225,12 @@ template <typename I>
|
||||
void SnapshotPurgeRequest<I>::handle_snap_remove(int r) {
|
||||
dout(10) << "r=" << r << dendl;
|
||||
|
||||
if (r < 0) {
|
||||
if (r == -EBUSY) {
|
||||
dout(10) << "snapshot in-use" << dendl;
|
||||
m_ret_val = r;
|
||||
close_image();
|
||||
return;
|
||||
} else if (r < 0) {
|
||||
derr << "failed to remove snapshot: " << cpp_strerror(r) << dendl;
|
||||
m_ret_val = r;
|
||||
close_image();
|
||||
|
Loading…
Reference in New Issue
Block a user