From: Sage Weil Date: Sat, 14 Jul 2012 21:31:34 +0000 (-0700) Subject: osd: based misdirected op role calc on acting set X-Git-Tag: v0.50~62^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=38962abd5b46bac8767ee57b2e7bf1b116ebc5c5;p=ceph.git osd: based misdirected op role calc on acting set We want to look at the acting set here, nothing else. This was causing us to erroneously queue ops for later (wasting memory) and to erroneously print out a 'misdrected op' message in the cluster log (confusion and incorrect [but ignored] -ENXIO reply). Fixes: #2022 Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 8a5d04016acc..054bf1b4a8f6 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5074,7 +5074,7 @@ void OSD::handle_op(OpRequestRef op) if (!pg) { dout(7) << "hit non-existent pg " << pgid << dendl; - if (osdmap->get_pg_role(pgid, whoami) >= 0) { + if (osdmap->get_pg_acting_role(pgid, whoami) >= 0) { dout(7) << "we are valid target for op, waiting" << dendl; waiting_for_pg[pgid].push_back(op); op->mark_delayed(); @@ -5094,7 +5094,7 @@ void OSD::handle_op(OpRequestRef op) send_map->have_pg_pool(pgid.pool())) pgid = send_map->raw_pg_to_pg(pgid); - if (send_map->get_pg_role(m->get_pg(), whoami) >= 0) { + if (send_map->get_pg_acting_role(m->get_pg(), whoami) >= 0) { dout(7) << "dropping request; client will resend when they get new map" << dendl; } else { dout(7) << "we are invalid target" << dendl;