diff options
author | Radosław Zarzyński <rzarzyns@redhat.com> | 2022-04-22 16:50:47 +0200 |
---|---|---|
committer | Radosław Zarzyński <rzarzyns@redhat.com> | 2022-05-05 04:06:32 +0200 |
commit | b7e2b11595c6e2cd2c638135ef6f044c40efaa87 (patch) | |
tree | 5391ed1514ed84570d07e361b8cc2c6078e040a5 /src/crimson/osd/recovery_backend.h | |
parent | crimson/osd: bring AggregateBlockingEvent. (diff) | |
download | ceph-b7e2b11595c6e2cd2c638135ef6f044c40efaa87.tar.xz ceph-b7e2b11595c6e2cd2c638135ef6f044c40efaa87.zip |
crimson/osd: migrate AggregateBlocker-related ops to new tracking infra
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
Diffstat (limited to 'src/crimson/osd/recovery_backend.h')
-rw-r--r-- | src/crimson/osd/recovery_backend.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/crimson/osd/recovery_backend.h b/src/crimson/osd/recovery_backend.h index eb621487a18..cc48dd7d0de 100644 --- a/src/crimson/osd/recovery_backend.h +++ b/src/crimson/osd/recovery_backend.h @@ -25,7 +25,7 @@ namespace crimson::osd{ class PGBackend; class RecoveryBackend { -protected: +public: class WaitForObjectRecovery; public: template <typename T = void> @@ -119,6 +119,7 @@ protected: object_stat_sum_t stat; }; +public: class WaitForObjectRecovery : public crimson::BlockerT<WaitForObjectRecovery> { seastar::shared_promise<> readable, recovered, pulled; std::map<pg_shard_t, seastar::shared_promise<>> pushes; @@ -138,11 +139,8 @@ protected: seastar::future<> wait_for_recovered() { return recovered.get_shared_future(); } - template <typename InterruptCond> - crimson::blocking_interruptible_future<InterruptCond> - wait_for_recovered_blocking() { - return make_blocking_interruptible_future<InterruptCond>( - recovered.get_shared_future()); + seastar::future<> wait_for_recovered(BlockingEvent::TriggerI& trigger) { + return trigger.maybe_record_blocking(recovered.get_shared_future(), *this); } seastar::future<> wait_for_pull() { return pulled.get_shared_future(); @@ -178,6 +176,9 @@ protected: void dump_detail(Formatter* f) const { } }; + using RecoveryBlockingEvent = + crimson::AggregateBlockingEvent<WaitForObjectRecovery::BlockingEvent>; +protected: std::map<hobject_t, WaitForObjectRecovery> recovering; hobject_t get_temp_recovery_object( const hobject_t& target, |