From: Sage Weil Date: Thu, 19 Dec 2013 21:14:18 +0000 (-0800) Subject: osd/ReplicatedPG: fix promote cancellation X-Git-Tag: v0.75~45^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8d31f71b329418d7a89722e76ed393f565792677;p=ceph.git osd/ReplicatedPG: fix promote cancellation The canceling caller cleans up the blocked objects for us; we simply need to bail out early. Signed-off-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4de16215364..0380e3ef009 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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; }