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 <sage@redhat.com>
void OSDService::handle_misdirected_op(PG *pg, OpRequestRef op)
{
+ if (!cct->_conf->osd_debug_misdirected_ops) {
+ return;
+ }
+
const MOSDOp *m = static_cast<const MOSDOp*>(op->get_req());
assert(m->get_type() == CEPH_MSG_OSD_OP);