I &image_ctx = this->m_image_ctx;
CephContext *cct = image_ctx.cct;
ldout(cct, 5) << this << " should_complete: " << " r=" << r << dendl;
- if (r < 0 && !(r == -ENOENT && m_ignore_enoent) ) {
+ if (r == -ERESTART) {
+ ldout(cct, 5) << "flatten operation interrupted" << dendl;
+ return true;
+ } else if (r < 0 && !(r == -ENOENT && m_ignore_enoent) ) {
lderr(cct) << "flatten encountered an error: " << cpp_strerror(r) << dendl;
return true;
}
break;
}
- if (r < 0) {
+ if (r == -ERESTART) {
+ ldout(cct, 5) << "rebuild object map operation interrupted" << dendl;
+ return true;
+ } else if (r < 0) {
lderr(cct) << "rebuild object map encountered an error: " << cpp_strerror(r)
<< dendl;
return true;
CephContext *cct = image_ctx.cct;
ldout(cct, 5) << this << " " << __func__ << ": r=" << *result << dendl;
- if (*result < 0) {
+ if (*result == -ERESTART) {
+ ldout(cct, 5) << "resize operation interrupted" << dendl;
+ return this->create_context_finisher();
+ } else if (*result < 0) {
lderr(cct) << "failed to trim image: " << cpp_strerror(*result) << dendl;
return this->create_context_finisher();
}
CephContext *cct = image_ctx.cct;
ldout(cct, 5) << this << " " << __func__ << ": r=" << *result << dendl;
- if (*result < 0) {
+ if (*result == -ERESTART) {
+ ldout(cct, 5) << "snapshot rollback operation interrupted" << dendl;
+ return this->create_context_finisher();
+ } else if (*result < 0) {
lderr(cct) << "failed to rollback objects: " << cpp_strerror(*result)
<< dendl;
return this->create_context_finisher();
boost::lambda::bind(boost::lambda::new_ptr<C_ScanPoolChildren<I> >(),
boost::lambda::_1, &image_ctx, pspec, pools, boost::lambda::_2));
AsyncObjectThrottle<I> *throttle = new AsyncObjectThrottle<I>(
- this, image_ctx, context_factory, ctx, NULL, 0, pools.size());
+ nullptr, image_ctx, context_factory, ctx, NULL, 0, pools.size());
throttle->start_ops(image_ctx.concurrent_management_ops);
}
I &image_ctx = this->m_image_ctx;
CephContext *cct = image_ctx.cct;
ldout(cct, 5) << this << " should_complete: r=" << r << dendl;
- if (r < 0) {
+ if (r == -ERESTART) {
+ ldout(cct, 5) << "trim operation interrupted" << dendl;
+ return true;
+ } else if (r < 0) {
lderr(cct) << "trim encountered an error: " << cpp_strerror(r) << dendl;
return true;
}