From c85a499b8d5c5734017133ab4626a3d48a3f4cf9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 19 Aug 2010 16:06:24 -0700 Subject: [PATCH] osd: disable potentially dangerous dead code Greg got a segfault accessing the OSDOP& first reference. Not clear why, but this whole block is dead code. --- src/osd/ReplicatedPG.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4fc1801735c..9baa8685cbb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2139,13 +2139,13 @@ void ReplicatedPG::op_applied(RepGather *repop) update_stats(); +#if 0 // any completion stuff to do here? if (repop->ctx->ops.size()) { const sobject_t& soid = repop->ctx->obs->oi.soid; OSDOp& first = repop->ctx->ops[0]; switch (first.op.op) { -#if 0 case CEPH_OSD_OP_UNBALANCEREADS: dout(-10) << "op_applied completed unbalance-reads on " << oid << dendl; unbalancing_reads.erase(oid); @@ -2164,7 +2164,6 @@ void ReplicatedPG::op_applied(RepGather *repop) } */ break; -#endif case CEPH_OSD_OP_WRUNLOCK: dout(-10) << "op_applied completed wrunlock on " << soid << dendl; @@ -2175,6 +2174,7 @@ void ReplicatedPG::op_applied(RepGather *repop) break; } } +#endif if (!repop->aborted) eval_repop(repop);