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 <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-07-14 14:31:34 -07:00
parent 14d2efc438
commit b7814dbefb

View File

@ -5341,7 +5341,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();
@ -5361,7 +5361,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;