]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: if we got ENOENT and an obc, we need to check the locks
authorSamuel Just <sjust@redhat.com>
Wed, 14 Jan 2015 22:27:02 +0000 (14:27 -0800)
committerSamuel Just <sjust@redhat.com>
Fri, 30 Jan 2015 19:33:25 +0000 (11:33 -0800)
Otherwise, we might return ENOENT out of order.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index 112ae72b2c9b5de85b0d585aef70bf7fac811c7a..f6cb41fc4e2cfa37aae21cc2c107bad265d87a5c 100644 (file)
@@ -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;
   }