From: Samuel Just Date: Tue, 13 Oct 2015 01:10:35 +0000 (-0700) Subject: ReplicatedPG::maybe_handle_cache_detail: always populate missing_oid X-Git-Tag: v9.2.0~16^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6221%2Fhead;p=ceph.git ReplicatedPG::maybe_handle_cache_detail: always populate missing_oid Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 6a0e633a8413c..98922946986e1 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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(op->get_req()); const object_locator_t& oloc = m->get_object_locator(); diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index e339e6a8d9681..04a6a45f7073a 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -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);