From 0ad717aa4d97d04bf389568bc69a5de7c3010472 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 28 Feb 2013 15:32:47 -0800 Subject: [PATCH] osd: useful debugging for when we drop requests Signed-off-by: Sage Weil Reviewed-by: Samuel Just --- src/osd/OSD.cc | 1 + src/osd/PG.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 95abe8f8b2213..8a4ea03508146 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5875,6 +5875,7 @@ void OSD::handle_op(OpRequestRef op) MOSDOp *m = (MOSDOp*)op->request; assert(m->get_header().type == CEPH_MSG_OSD_OP); if (op_is_discardable(m)) { + dout(10) << " discardable " << *m << dendl; return; } diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c6617f853b0f9..d5a0a09433348 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1691,6 +1691,7 @@ void PG::do_request(OpRequestRef op) return; } if (must_delay_request(op)) { + dout(20) << " waiting for map on " << op << dendl; waiting_for_map.push_back(op); return; } @@ -1698,6 +1699,7 @@ void PG::do_request(OpRequestRef op) return; } if (!flushed) { + dout(20) << " !flushed, waiting for active on " << op << dendl; waiting_for_active.push_back(op); return; } @@ -1705,6 +1707,7 @@ void PG::do_request(OpRequestRef op) switch (op->request->get_type()) { case CEPH_MSG_OSD_OP: if (is_replay() || !is_active()) { + dout(20) << " replay, waiting for active on " << op << dendl; waiting_for_active.push_back(op); return; } @@ -4792,6 +4795,7 @@ bool PG::can_discard_op(OpRequestRef op) { MOSDOp *m = (MOSDOp*)op->request; if (OSD::op_is_discardable(m)) { + dout(20) << " discard " << *m << dendl; return true; } else if (op->may_write() && (!is_primary() || -- 2.39.5