From 721c87837c754dc031f0efac355a0798b3d65e32 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 14 Jan 2015 14:27:02 -0800 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 112ae72b2c9..f6cb41fc4e2 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; } -- 2.47.3