blob: 820c7beabc23a248ac3d67a515d426f705cb145f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
});
});
}
}
|