]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: fix skipped map handling
authorSage Weil <sage@inktank.com>
Mon, 27 Aug 2012 15:24:08 +0000 (08:24 -0700)
committerSage Weil <sage@inktank.com>
Tue, 28 Aug 2012 00:25:57 +0000 (17:25 -0700)
If we skip a map, we want to translate NO_ACTION to NEED_RESEND, but leave
POOL_DNE alone.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osdc/Objecter.cc

index 781a9278304dd137b2407c7b72e72984abde98b3..48c07d112d7fb0b2d2d9c0a293aee2589f312f48 100644 (file)
@@ -398,12 +398,12 @@ void Objecter::scan_requests(bool skipped_map,
     LingerOp *op = p->second;
     ldout(cct, 10) << " checking linger op " << op->linger_id << dendl;
     int r = recalc_linger_op_target(op);
-    if (skipped_map)
-      r = RECALC_OP_TARGET_NEED_RESEND;
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
-      // do nothing
-      break;
+      // resend if skipped map; otherwise do nothing.
+      if (!skipped_map)
+       break;
+      // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
       need_resend_linger.push_back(op);
       linger_cancel_map_check(op);
@@ -421,12 +421,12 @@ void Objecter::scan_requests(bool skipped_map,
     Op *op = p->second;
     ldout(cct, 10) << " checking op " << op->tid << dendl;
     int r = recalc_op_target(op);
-    if (skipped_map)
-      r = RECALC_OP_TARGET_NEED_RESEND;
     switch (r) {
     case RECALC_OP_TARGET_NO_ACTION:
-      // do nothing
-      break;
+      // resend if skipped map; otherwise do nothing.
+      if (!skipped_map)
+       break;
+      // -- fall-thru --
     case RECALC_OP_TARGET_NEED_RESEND:
       need_resend[op->tid] = op;
       op_cancel_map_check(op);