]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: Introduce PG peering helpers
authorMatan Breizman <mbreizma@redhat.com>
Wed, 5 Mar 2025 15:55:52 +0000 (15:55 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 6 Mar 2025 09:34:49 +0000 (09:34 +0000)
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 <mbreizma@redhat.com>
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/pg.h

index febfa72545814462e5b2a05a978c34016f4d6378..b6b7b67262980c91128221502f85b7ce7e227497 100644 (file)
@@ -560,6 +560,20 @@ public:
     return peering_state.get_primary();
   }
 
+  eversion_t get_last_complete() const {
+    return peering_state.get_info().last_complete;
+  }
+
+  void complete_write(eversion_t v, eversion_t lc) {
+    peering_state.complete_write(v, lc);
+  }
+
+  void update_peer_last_complete_ondisk(
+    pg_shard_t fromosd,
+    eversion_t lcod) {
+    peering_state.update_peer_last_complete_ondisk(fromosd, lcod);
+  }
+
   /// initialize created PG
   seastar::future<> init(
     int role,