From 981add9cad5f2db06a4932be228eb0ff30254a9b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 22 Jul 2014 18:01:14 -0700 Subject: [PATCH] osd/ReplicatedPG: debug obc locks Signed-off-by: Sage Weil (cherry picked from commit 356af4bf46d6387e2f1a59646548f9a77e49e5f8) --- src/osd/ReplicatedPG.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index c2b289c1cb922..b198b4d6f27eb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4856,6 +4856,7 @@ void ReplicatedPG::make_writeable(OpContext *ctx) snap_oi = &ctx->clone_obc->obs.oi; bool got = ctx->clone_obc->get_write_greedy(ctx->op); assert(got); + dout(20) << " got greedy write on clone_obc " << *ctx->clone_obc << dendl; } else { snap_oi = &static_snap_oi; } @@ -5162,6 +5163,7 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type, bool maintain_ssc ctx->snapset_obc = get_object_context(snapoid, true); bool got = ctx->snapset_obc->get_write_greedy(ctx->op); assert(got); + dout(20) << " got greedy write on snapset_obc " << *ctx->snapset_obc << dendl; ctx->release_snapset_obc = true; if (pool.info.require_rollback() && !ctx->snapset_obc->obs.exists) { ctx->log.back().mod_desc.create(); @@ -6841,6 +6843,12 @@ ReplicatedPG::RepGather *ReplicatedPG::new_repop(OpContext *ctx, ObjectContextRe void ReplicatedPG::remove_repop(RepGather *repop) { dout(20) << __func__ << " " << *repop << dendl; + if (repop->ctx->obc) + dout(20) << " obc " << *repop->ctx->obc << dendl; + if (repop->ctx->clone_obc) + dout(20) << " clone_obc " << *repop->ctx->clone_obc << dendl; + if (repop->ctx->snapset_obc) + dout(20) << " snapset_obc " << *repop->ctx->snapset_obc << dendl; release_op_ctx_locks(repop->ctx); repop->ctx->finish(0); // FIXME: return value here is sloppy repop_map.erase(repop->rep_tid); -- 2.39.5