Skip to content

Commit 551eb00

Browse files
committed
crimson/osd/pg: Introduce PG peering helpers
This will be used once we'll call complete_write from ReplicatedBackend and not from PG as we do now. Signed-off-by: Matan Breizman <[email protected]> Signed-off-by: Xuehan Xu <[email protected]>
1 parent 164d76f commit 551eb00

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/crimson/osd/pg.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,20 @@ class PG : public boost::intrusive_ref_counter<
560560
return peering_state.get_primary();
561561
}
562562

563+
eversion_t get_last_complete() const {
564+
return peering_state.get_info().last_complete;
565+
}
566+
567+
void complete_write(eversion_t v, eversion_t lc) {
568+
peering_state.complete_write(v, lc);
569+
}
570+
571+
void update_peer_last_complete_ondisk(
572+
pg_shard_t fromosd,
573+
eversion_t lcod) {
574+
peering_state.update_peer_last_complete_ondisk(fromosd, lcod);
575+
}
576+
563577
/// initialize created PG
564578
seastar::future<> init(
565579
int role,

0 commit comments

Comments
 (0)