From: Samuel Just Date: Wed, 14 Jan 2015 22:27:02 +0000 (-0800) Subject: ReplicatedPG: if we got ENOENT and an obc, we need to check the locks X-Git-Tag: v0.93~128^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=721c87837c754dc031f0efac355a0798b3d65e32;p=ceph.git ReplicatedPG: if we got ENOENT and an obc, we need to check the locks Otherwise, we might return ENOENT out of order. Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 112ae72b2c9b..f6cb41fc4e2c 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1553,7 +1553,8 @@ void ReplicatedPG::do_op(OpRequestRef& op) maybe_handle_cache(op, write_ordered, obc, r, missing_oid, false, in_hit_set)) return; - if (r) { + if (r && (r != -ENOENT || !obc)) { + dout(20) << __func__ << "find_object_context got error " << r << dendl; osd->reply_op_error(op, r); return; } @@ -1716,6 +1717,13 @@ void ReplicatedPG::do_op(OpRequestRef& op) return; } + if (r) { + dout(20) << __func__ << " returned an error: " << r << dendl; + close_op_ctx(ctx, r); + osd->reply_op_error(op, r); + return; + } + if (m->get_flags() & CEPH_OSD_FLAG_IGNORE_CACHE) { ctx->ignore_cache = true; }