From: Kefu Chai Date: Mon, 15 Jul 2019 04:29:57 +0000 (+0800) Subject: crimson/osd: implement PeeringListener::on_activate() X-Git-Tag: v15.1.0~1909^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e26ba3aeeddfaf483e0a291e233032d545d1ce6d;p=ceph.git crimson/osd: implement PeeringListener::on_activate() see also f7b55ec14415811d750e79838f746a91106ba81e Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 5669285d0e1b6..2b89a78513db6 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -124,6 +124,11 @@ bool PG::try_flush_or_schedule_async() { return false; } +void PG::on_activate(interval_set) +{ + projected_last_update = peering_state.get_info().last_update; +} + void PG::on_activate_complete() { active_promise.set_value(); diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 37489c92f0198..5f3692b3729c4 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -257,9 +257,7 @@ public: void on_change(ObjectStore::Transaction &t) final { // Not needed yet } - void on_activate(interval_set to_trim) final { - // Not needed yet (will be needed for IO unblocking) - } + void on_activate(interval_set to_trim) final; void on_activate_complete() final; void on_new_interval() final { // Not needed yet @@ -442,6 +440,7 @@ private: std::unique_ptr backend; PeeringState peering_state; + eversion_t projected_last_update; seastar::shared_promise<> active_promise; seastar::future<> wait_for_active();