Otherwise, we might start backfilling the clone before the op is
complete.
Signed-off-by: Samuel Just <sam.just@inktank.com>
if (pool.info.require_rollback())
ctx->clone_obc->attr_cache = ctx->obc->attr_cache;
snap_oi = &ctx->clone_obc->obs.oi;
+ bool got = ctx->clone_obc->get_write(ctx->op);
+ assert(got);
} else {
snap_oi = &static_snap_oi;
}
void release_op_ctx_locks(OpContext *ctx) {
list<OpRequestRef> to_req;
bool requeue_recovery = false;
+ bool requeue_recovery_clone = false;
switch (ctx->lock_to_release) {
case OpContext::W_LOCK:
ctx->obc->put_write(&to_req, &requeue_recovery);
- if (requeue_recovery)
+ if (ctx->clone_obc)
+ ctx->clone_obc->put_write(&to_req, &requeue_recovery_clone);
+ if (requeue_recovery || requeue_recovery_clone)
osd->recovery_wq.queue(this);
break;
case OpContext::R_LOCK: