]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: implement PeeringListener::on_activate()
authorKefu Chai <kchai@redhat.com>
Mon, 15 Jul 2019 04:29:57 +0000 (12:29 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 12 Aug 2019 10:01:46 +0000 (18:01 +0800)
see also f7b55ec14415811d750e79838f746a91106ba81e

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index 5669285d0e1b6139beb8510bead3e2dbc25f8851..2b89a78513db6eb0c3bce47d7cb999d2adec6418 100644 (file)
@@ -124,6 +124,11 @@ bool PG::try_flush_or_schedule_async() {
   return false;
 }
 
+void PG::on_activate(interval_set<snapid_t>)
+{
+  projected_last_update = peering_state.get_info().last_update;
+}
+
 void PG::on_activate_complete()
 {
   active_promise.set_value();
index 37489c92f019802d301294a7aed8210d40dcd6e7..5f3692b3729c4723d3122cd18ca54595556b10d3 100644 (file)
@@ -257,9 +257,7 @@ public:
   void on_change(ObjectStore::Transaction &t) final {
     // Not needed yet
   }
-  void on_activate(interval_set<snapid_t> to_trim) final {
-    // Not needed yet (will be needed for IO unblocking)
-  }
+  void on_activate(interval_set<snapid_t> to_trim) final;
   void on_activate_complete() final;
   void on_new_interval() final {
     // Not needed yet
@@ -442,6 +440,7 @@ private:
   std::unique_ptr<PGBackend> backend;
 
   PeeringState peering_state;
+  eversion_t projected_last_update;
 
   seastar::shared_promise<> active_promise;
   seastar::future<> wait_for_active();