]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::maybe_handle_cache_detail: always populate missing_oid 6221/head
authorSamuel Just <sjust@redhat.com>
Tue, 13 Oct 2015 01:10:35 +0000 (18:10 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 13 Oct 2015 01:40:06 +0000 (18:40 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 6a0e633a8413c37328218130abd884a3a7f1dcff..98922946986e17d1a918510b081548bd1ba645fc 100644 (file)
@@ -1955,7 +1955,7 @@ ReplicatedPG::cache_result_t ReplicatedPG::maybe_handle_cache_detail(
   OpRequestRef op,
   bool write_ordered,
   ObjectContextRef obc,
-  int r, const hobject_t& missing_oid,
+  int r, hobject_t missing_oid,
   bool must_promote,
   bool in_hit_set,
   ObjectContextRef *promote_obc)
@@ -2004,7 +2004,11 @@ ReplicatedPG::cache_result_t ReplicatedPG::maybe_handle_cache_detail(
     osd->logger->inc(l_osd_op_cache_hit);
     return cache_result_t::NOOP;
   }
-  
+
+  if (missing_oid == hobject_t() && obc.get()) {
+    missing_oid = obc->obs.oi.soid;
+  }
+
   MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
   const object_locator_t& oloc = m->get_object_locator();
 
index e339e6a8d968157282e1d3228ea74145e8da9309..04a6a45f7073a822b94ae6f69a9f4aacd64abe67 100644 (file)
@@ -1181,7 +1181,7 @@ protected:
   cache_result_t maybe_handle_cache_detail(OpRequestRef op,
                                           bool write_ordered,
                                           ObjectContextRef obc, int r,
-                                          const hobject_t& missing_oid,
+                                          hobject_t missing_oid,
                                           bool must_promote,
                                           bool in_hit_set,
                                           ObjectContextRef *promote_obc);