r = invoke_async_request("check object map", true,
boost::bind(&Operations<I>::check_object_map, this,
boost::ref(prog_ctx), _1),
- [] (Context *c) { c->complete(-EOPNOTSUPP); });
+ [this](Context *c) {
+ m_image_ctx.op_work_queue->queue(c, -EOPNOTSUPP);
+ });
return r;
}
bool ObjectMapIterateRequest<I>::should_complete(int r) {
CephContext *cct = m_image_ctx.cct;
ldout(cct, 5) << this << " should_complete: " << " r=" << r << dendl;
+ if (r < 0) {
+ lderr(cct) << "object map operation encountered an error: "
+ << cpp_strerror(r) << dendl;
+ }
RWLock::RLocker owner_lock(m_image_ctx.owner_lock);
switch (m_state) {
case STATE_VERIFY_OBJECTS:
if (m_invalidate.test_and_set()) {
send_invalidate_object_map();
+ return false;
} else if (r == 0) {
return true;
}
}
if (r < 0) {
- lderr(cct) << "object map operation encountered an error: "
- << cpp_strerror(r)
- << dendl;
return true;
}