using crimson::common::sharded_conf;
using crimson::common::sharded_perf_coll;
try {
- return app.run_deprecated(app_args.size(), const_cast<char**>(app_args.data()), [&] {
+ return app.run_deprecated(app_args.size(), const_cast<char**>(app_args.data()),
+ [&, &ceph_args=ceph_args] {
auto& config = app.configuration();
return seastar::async([&] {
if (config.count("debug")) {
auto &[head_obc, head_existed] = p;
if (oid.is_head()) {
if (head_existed) {
- return head_obc->get_lock_type(op, type).then([head_obc] {
+ return head_obc->get_lock_type(op, type).then([head_obc=head_obc] {
ceph_assert(head_obc->loaded);
return load_obc_ertr::make_ready_future<ObjectContextRef>(head_obc);
});
}
} else {
return head_obc->get_lock_type(op, RWState::RWREAD).then(
- [this, head_obc, op, oid, type] {
+ [this, head_obc=head_obc, op, oid, type] {
ceph_assert(head_obc->loaded);
return get_or_load_clone_obc(oid, head_obc);
- }).safe_then([this, head_obc, op, oid, type](auto p) {
+ }).safe_then([this, head_obc=head_obc, op, oid, type](auto p) {
auto &[obc, existed] = p;
if (existed) {
return load_obc_ertr::future<>(
- obc->get_lock_type(op, type)).safe_then([obc] {
+ obc->get_lock_type(op, type)).safe_then([obc=obc] {
ceph_assert(obc->loaded);
return load_obc_ertr::make_ready_future<ObjectContextRef>(obc);
});
obc->degrade_excl_to(type);
return load_obc_ertr::make_ready_future<ObjectContextRef>(obc);
}
- }).safe_then([head_obc](auto obc) {
+ }).safe_then([head_obc=head_obc](auto obc) {
head_obc->put_lock_type(RWState::RWREAD);
return load_obc_ertr::make_ready_future<ObjectContextRef>(obc);
});
F &&f) {
auto [oid, type] = get_oid_and_lock(*m, op_info);
return get_locked_obc(op, oid, type)
- .safe_then([this, f=std::forward<F>(f), type](auto obc) {
- return f(obc).finally([this, obc, type] {
+ .safe_then([this, f=std::forward<F>(f), type=type](auto obc) {
+ return f(obc).finally([this, obc, type=type] {
obc->put_lock_type(type);
return load_obc_ertr::now();
});
[this](auto& osd_messages) {
auto& [peer, messages] = osd_messages;
logger().debug("dispatch_context_messages sending messages to {}", peer);
- return seastar::parallel_for_each(std::move(messages), [=](auto& m) {
+ return seastar::parallel_for_each(
+ std::move(messages), [=, peer=peer](auto& m) {
return send_to_osd(peer, m, osdmap->get_epoch());
});
});