From 0ff3d4291c612ed8bbe6f9ee636b1ab2c891f21d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 25 May 2017 15:31:33 -0400 Subject: [PATCH] osd: do not bother with misdirected op diagnosis by default We enable osd_debug_misdirected_ops in QA, but this is wasted effort on a production cluster. In particular, it means that a idle client that sends an op to the wrong OSD based on an old map will require that OSD to load that old map into memory to decide whether to print a warning... all on the off-chance that the client is buggy. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 413e15da1c7..7913c41055d 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1528,6 +1528,10 @@ void OSDService::reply_op_error(OpRequestRef op, int err, eversion_t v, void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op) { + if (!cct->_conf->osd_debug_misdirected_ops) { + return; + } + const MOSDOp *m = static_cast(op->get_req()); assert(m->get_type() == CEPH_MSG_OSD_OP);