#include "common/dout.h"
#include "common/errno.h"
#include "librbd/ImageCtx.h"
+#include "librbd/ImageState.h"
#include "librbd/Utils.h"
#include "librbd/io/ImageDispatcher.h"
#include "librbd/migration/ImageDispatch.h"
if (r < 0) {
lderr(cct) << "failed to parse migration source-spec:" << cpp_strerror(r)
<< dendl;
+ (*m_src_image_ctx)->state->close();
finish(r);
return;
}
if (r < 0) {
lderr(cct) << "failed to build migration format handler: "
<< cpp_strerror(r) << dendl;
+ (*m_src_image_ctx)->state->close();
finish(r);
return;
}
ldout(cct, 10) << "r=" << r << dendl;
if (r < 0) {
- delete *m_src_image_ctx;
*m_src_image_ctx = nullptr;
}
+
m_on_finish->complete(r);
delete this;
}