]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: fix promote cancellation
authorSage Weil <sage@inktank.com>
Thu, 19 Dec 2013 21:14:18 +0000 (13:14 -0800)
committerSage Weil <sage@inktank.com>
Fri, 20 Dec 2013 00:40:02 +0000 (16:40 -0800)
The canceling caller cleans up the blocked objects for us; we simply need
to bail out early.

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

index 4de162153642689bf05094ac4ccd2e05f84024e5..0380e3ef0097766eba19050df67896167599a6cf 100644 (file)
@@ -4882,6 +4882,10 @@ void ReplicatedPG::finish_promote(int r, OpRequestRef op,
   dout(10) << __func__ << " " << soid << " r=" << r
           << " uv" << results->user_version << dendl;
 
+  if (r == -ECANCELED) {
+    return;
+  }
+
   bool whiteout = false;
   if (r == -ENOENT &&
       (pool.info.cache_mode == pg_pool_t::CACHEMODE_WRITEBACK ||
@@ -4900,9 +4904,7 @@ void ReplicatedPG::finish_promote(int r, OpRequestRef op,
     if (blocked_iter->second.empty()) {
       waiting_for_blocked_object.erase(blocked_iter);
     }
-    if (r != -ECANCELED) { // on cancel the client will resend
-      osd->reply_op_error(op, r);
-    }
+    osd->reply_op_error(op, r);
     return;
   }