From: Xuehan Xu Date: Mon, 4 Nov 2024 07:18:19 +0000 (+0800) Subject: crimson/osd/pg: add is_missing_on_peer() X-Git-Tag: v20.0.0~652^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b75dd8d333ef1435fd17857d7b1c233bf45f6e3d;p=ceph.git crimson/osd/pg: add is_missing_on_peer() Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index e2cdd09bb09be..544ffb6a6853d 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -1605,7 +1605,7 @@ bool PG::should_send_op( // missing set hoid <= peering_state.get_peer_info(peer).last_backfill || (has_backfill_state() && hoid <= get_last_backfill_started() && - !peering_state.get_peer_missing(peer).is_missing(hoid))); + !is_missing_on_peer(peer, hoid))); if (!should_send) { ceph_assert(is_backfill_target(peer)); logger().debug("{} issue_repop shipping empty opt to osd." diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index cc798f60a5b60..632683690a2ea 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -901,6 +901,11 @@ private: !peering_state.get_missing_loc().readable_with_acting( oid, get_actingset(), v); } + bool is_missing_on_peer( + const pg_shard_t &peer, + const hobject_t &soid) const { + return peering_state.get_peer_missing(peer).is_missing(soid); + } bool is_degraded_or_backfilling_object(const hobject_t& soid) const; const std::set &get_actingset() const { return peering_state.get_actingset();