diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/crimson/osd/osd_operations/recovery_subrequest.cc | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/crimson/osd/osd_operations/recovery_subrequest.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/crimson/osd/osd_operations/recovery_subrequest.cc b/src/crimson/osd/osd_operations/recovery_subrequest.cc new file mode 100644 index 000000000..820c7beab --- /dev/null +++ b/src/crimson/osd/osd_operations/recovery_subrequest.cc @@ -0,0 +1,29 @@ +#include <fmt/format.h> +#include <fmt/ostream.h> + +#include "crimson/osd/osd_operations/recovery_subrequest.h" + +namespace { + seastar::logger& logger() { + return crimson::get_logger(ceph_subsys_osd); + } +} + +namespace crimson::osd { + +seastar::future<> RecoverySubRequest::start() { + logger().debug("{}: start", *this); + + IRef opref = this; + return with_blocking_future(osd.osdmap_gate.wait_for_map(m->get_min_epoch())) + .then([this] (epoch_t epoch) { + return with_blocking_future(osd.wait_for_pg(m->get_spg())); + }).then([this, opref=std::move(opref)] (Ref<PG> pgref) { + return seastar::do_with(std::move(pgref), std::move(opref), + [this](auto& pgref, auto& opref) { + return pgref->get_recovery_backend()->handle_recovery_op(m); + }); + }); +} + +} |