From 8855e608586d2d37b358d39e9beab2f935fd3235 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 12 Oct 2015 18:10:35 -0700 Subject: [PATCH] ReplicatedPG::maybe_handle_cache_detail: always populate missing_oid Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 8 ++++++-- src/osd/ReplicatedPG.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) 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); -- 2.39.5