]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: based misdirected op role calc on acting set
authorSage Weil <sage@inktank.com>
Sat, 14 Jul 2012 21:31:34 +0000 (14:31 -0700)
committerSage Weil <sage@inktank.com>
Sun, 15 Jul 2012 00:39:33 +0000 (17:39 -0700)
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>
src/osd/OSD.cc

index 8a5d04016acc9f037e2b6fd560d0ab1e6f8aa617..054bf1b4a8f6bfe398163311ea50830ef75f8652 100644 (file)
@@ -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;