logger().debug("{}", __func__);
assert(tp);
return do_with_op_gate(std::vector<ghobject_t>(), ghobject_t(),
- [=] (auto &objects, auto &next) {
+ [=, this] (auto &objects, auto &next) {
objects.reserve(limit);
return tp->submit(ch->get_cid().hash_to_shard(tp->size()),
- [=, &objects, &next] {
+ [=, this, &objects, &next] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->collection_list(c->collection, start, end,
store->get_ideal_list_max(),
logger().debug("{}", __func__);
assert(tp);
- return do_with_op_gate(std::vector<coll_t>{}, [=] (auto &ls) {
+ return do_with_op_gate(std::vector<coll_t>{}, [this] (auto &ls) {
return tp->submit([this, &ls] {
return store->list_collections(ls);
}).then([&ls] (int r) {
{
logger().debug("{}", __func__);
assert(tp);
- return do_with_op_gate(ceph::bufferlist{}, [=] (auto &bl) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &bl] {
+ return do_with_op_gate(ceph::bufferlist{}, [=, this] (auto &bl) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &bl] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->read(c->collection, oid, offset, len, bl, op_flags);
}).then([&bl] (int r) -> read_errorator::future<ceph::bufferlist> {
logger().debug("{}", __func__);
assert(tp);
return do_with_op_gate(ceph::bufferlist{}, std::string{name},
- [=] (auto &value, const auto& name) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &value, &name] {
+ [=, this] (auto &value, const auto& name) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &value, &name] {
// XXX: `name` isn't a `std::string_view` anymore! it had to be converted
// to `std::string` for the sake of extending life-time not only of
// a _ptr-to-data_ but _data_ as well. Otherwise we would run into a use-
{
logger().debug("{}", __func__);
assert(tp);
- return do_with_op_gate(attrs_t{}, [=] (auto &aset) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &aset] {
+ return do_with_op_gate(attrs_t{}, [=, this] (auto &aset) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &aset] {
auto c = static_cast<AlienCollection*>(ch.get());
const auto r = store->getattrs(c->collection, oid, aset);
return r;
{
logger().debug("{}", __func__);
assert(tp);
- return do_with_op_gate(omap_values_t{}, [=] (auto &values) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &values] {
+ return do_with_op_gate(omap_values_t{}, [=, this] (auto &values) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &values] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->omap_get_values(c->collection, oid, keys,
reinterpret_cast<map<string, bufferlist>*>(&values));
{
logger().debug("{} with_start", __func__);
assert(tp);
- return do_with_op_gate(omap_values_t{}, [=] (auto &values) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &values] {
+ return do_with_op_gate(omap_values_t{}, [=, this] (auto &values) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &values] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->omap_get_values(c->collection, oid, start,
reinterpret_cast<map<string, bufferlist>*>(&values));
{
logger().debug("{}", __func__);
assert(tp);
- return seastar::with_gate(op_gate, [=] {
- return tp->submit([=] {
+ return seastar::with_gate(op_gate, [=, this] {
+ return tp->submit([o, this] {
return store->inject_data_error(o);
});
});
{
logger().debug("{}", __func__);
assert(tp);
- return seastar::with_gate(op_gate, [=] {
- return tp->submit([=] {
+ return seastar::with_gate(op_gate, [=, this] {
+ return tp->submit([=, this] {
return store->inject_mdata_error(o);
});
});
{
logger().debug("{}", __func__);
assert(tp);
- return seastar::with_gate(op_gate, [=] {
- return tp->submit([=] {
+ return seastar::with_gate(op_gate, [=, this] {
+ return tp->submit([=, this] {
return store->write_meta(key, value);
}).then([] (int r) {
assert(r == 0);
-> get_attr_errorator::future<ceph::bufferlist>
{
assert(tp);
- return do_with_op_gate(ceph::bufferlist(), [=](auto& bl) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &bl] {
+ return do_with_op_gate(ceph::bufferlist(), [=, this](auto& bl) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &bl] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->omap_get_header(c->collection, oid, &bl);
}).then([&bl](int r) -> get_attr_errorator::future<ceph::bufferlist> {
uint64_t len)
{
assert(tp);
- return do_with_op_gate(std::map<uint64_t, uint64_t>(), [=](auto& destmap) {
- return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &destmap] {
+ return do_with_op_gate(std::map<uint64_t, uint64_t>(), [=, this](auto& destmap) {
+ return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, this, &destmap] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->fiemap(c->collection, oid, off, len, destmap);
}).then([&destmap](int r)
static const char read_meta_errmsg[]{"read_meta"};
static const char parse_fsid_errmsg[]{"failed to parse fsid"};
static const char match_ofsid_errmsg[]{"unmatched osd_fsid"};
- return read_meta("fsid").then([=](auto&& ret) -> mkfs_ertr::future<> {
+ return read_meta("fsid").then([=, this](auto&& ret) -> mkfs_ertr::future<> {
auto& [r, fsid_str] = ret;
if (r == -ENOENT) {
if (new_osd_fsid.is_zero()) {
return lower_bound(
c, laddr
- ).si_then([=](auto iter) {
+ ).si_then([=, this](auto iter) {
assert(iter.get_depth() >= depth);
if (depth == iter.get_depth()) {
SUBTRACET(seastore_fixedkv_tree, "update at root", c.trans);
"Invalid error in Cache::replay_delta"
}
);
- return extent_fut.safe_then([=, &delta](auto extent) {
+ return extent_fut.safe_then([=, this, &delta](auto extent) {
if (!extent) {
DEBUG("replay extent is not present, so delta is obsolete at {} {} -- {}",
journal_seq, record_base, delta);
extent_init_func_t &&extent_init_func,
extent_init_func_t &&on_cache)
{
- return [=, extent_init_func=std::move(extent_init_func)]() mutable {
+ return [=, this, extent_init_func=std::move(extent_init_func)]() mutable {
src_ext_t* p_metric_key = nullptr;
src_ext_t metric_key;
if (p_src) {
{
logger().debug("FlatCollectionManager: {}", __func__);
return get_coll_root(coll_root, t
- ).si_then([=, &coll_root, &t] (auto &&extent) {
+ ).si_then([=, this, &coll_root, &t] (auto &&extent) {
return extent->create(
get_coll_context(t), cid, info.split_bits
- ).si_then([=, &coll_root, &t] (auto ret) {
+ ).si_then([=, this, &coll_root, &t] (auto ret) {
switch (ret) {
case CollectionNode::create_result_t::OVERFLOW: {
logger().debug("FlatCollectionManager: {} overflow!", __func__);
assert(new_size < MAX_FLAT_BLOCK_SIZE);
return tm.alloc_extent<CollectionNode>(
t, L_ADDR_MIN, new_size
- ).si_then([=, &coll_root, &t] (auto &&root_extent) {
+ ).si_then([=, this, &coll_root, &t] (auto &&root_extent) {
coll_root.update(root_extent->get_laddr(), root_extent->get_length());
root_extent->decoded = extent->decoded;
root_extent->loaded = true;
return root_extent->create(
get_coll_context(t), cid, info.split_bits
- ).si_then([=, &t](auto result) {
+ ).si_then([=, this, &t](auto result) {
assert(result == CollectionNode::create_result_t::SUCCESS);
return tm.dec_ref(t, extent->get_laddr());
}).si_then([] (auto) {
auto is_left = (iter + 1) == iter_cend();
auto donor_iter = is_left ? iter - 1 : iter + 1;
return omap_load_extent(oc, donor_iter->get_val(), get_meta().depth - 1)
- .si_then([=] (auto &&donor) mutable {
+ .si_then([=, this] (auto &&donor) mutable {
LOG_PREFIX(OMapInnerNode::merge_entry);
auto [l, r] = is_left ?
std::make_pair(donor, entry) : std::make_pair(entry, donor);
return seastar::do_with(in_path, [this, mode](auto& in_path) {
return seastar::file_stat(in_path).then([this, mode, in_path](auto stat) {
size = stat.size;
- return seastar::open_file_dma(in_path, mode).then([=](auto file) {
+ return seastar::open_file_dma(in_path, mode).then([=, this](auto file) {
device = file;
logger().debug("open");
// Get SSD's features from identify_controller and namespace command.
const std::string& in_path,
seastar::open_flags mode) {
io_device.resize(stream_id_count);
- return seastar::do_for_each(io_device, [=](auto &target_device) {
+ return seastar::do_for_each(io_device, [=, this](auto &target_device) {
return seastar::open_file_dma(in_path, mode).then([this](
auto file) {
io_device[stream_index_to_open] = file;
Transaction::src_t::READ,
"read_obj",
op_type_t::READ,
- [=](auto &t, auto &onode) -> ObjectDataHandler::read_ret {
+ [=, this](auto &t, auto &onode) -> ObjectDataHandler::read_ret {
size_t size = onode.get_layout().size;
if (offset >= size) {
return seastar::do_with(
_oid,
ceph::bufferlist{},
- [=, &m](auto &oid, auto &ret) {
+ [=, this, &m](auto &oid, auto &ret) {
return crimson::do_for_each(
m,
- [=, &oid, &ret](auto &p) {
+ [=, this, &oid, &ret](auto &p) {
return read(
ch, oid, p.first, p.second, op_flags
).safe_then([&ret](auto bl) {
Transaction::src_t::READ,
"get_attr",
op_type_t::GET_ATTR,
- [=](auto &t, auto& onode) -> _omap_get_value_ret {
+ [=, this](auto &t, auto& onode) -> _omap_get_value_ret {
auto& layout = onode.get_layout();
if (name == OI_ATTR && layout.oi_size) {
ceph::bufferlist bl;
Transaction::src_t::READ,
"get_addrs",
op_type_t::GET_ATTRS,
- [=](auto &t, auto& onode) {
+ [=, this](auto &t, auto& onode) {
auto& layout = onode.get_layout();
return _omap_list(onode, layout.xattr_root, t, std::nullopt,
OMapManager::omap_list_config_t::with_inclusive(false)
Transaction::src_t::READ,
"stat",
op_type_t::STAT,
- [=, &oid](auto &t, auto &onode) {
+ [=, this, &oid](auto &t, auto &onode) {
struct stat st;
auto &olayout = onode.get_layout();
st.st_size = olayout.size;
{
return seastar::do_with(
ObjectDataHandler(max_object_size),
- [=, &t, &onode] (auto &objhandler) {
+ [=, this, &t, &onode] (auto &objhandler) {
return objhandler.fiemap(
ObjectDataHandler::context_t{
*transaction_manager,
Transaction::src_t::READ,
"fiemap_read",
op_type_t::READ,
- [=](auto &t, auto &onode) -> _fiemap_ret {
+ [=, this](auto &t, auto &onode) -> _fiemap_ret {
size_t size = onode.get_layout().size;
if (off >= size) {
INFOT("fiemap offset is over onode size!", t);
return seastar::do_with(
std::move(_bl),
ObjectDataHandler(max_object_size),
- [=, &ctx, &onode](auto &bl, auto &objhandler) {
+ [=, this, &ctx, &onode](auto &bl, auto &objhandler) {
return objhandler.write(
ObjectDataHandler::context_t{
*transaction_manager,
object_size = std::max<uint64_t>(offset + len, object_size);
return seastar::do_with(
ObjectDataHandler(max_object_size),
- [=, &ctx, &onode](auto &objhandler) {
+ [=, this, &ctx, &onode](auto &objhandler) {
return objhandler.zero(
ObjectDataHandler::context_t{
*transaction_manager,
onode->get_mutable_layout(*ctx.transaction).size = size;
return seastar::do_with(
ObjectDataHandler(max_object_size),
- [=, &ctx, &onode](auto &objhandler) {
+ [=, this, &ctx, &onode](auto &objhandler) {
return objhandler.truncate(
ObjectDataHandler::context_t{
*transaction_manager,
{
return transaction_manager->read_collection_root(
*ctx.transaction
- ).si_then([=, &ctx](auto _cmroot) {
+ ).si_then([=, this, &ctx](auto _cmroot) {
return seastar::do_with(
_cmroot,
- [=, &ctx](auto &cmroot) {
+ [=, this, &ctx](auto &cmroot) {
return collection_manager->create(
cmroot,
*ctx.transaction,
cid,
bits
- ).si_then([=, &ctx, &cmroot] {
+ ).si_then([this, &ctx, &cmroot] {
if (cmroot.must_update()) {
transaction_manager->write_collection_root(
*ctx.transaction,
{
return transaction_manager->read_collection_root(
*ctx.transaction
- ).si_then([=, &ctx](auto _cmroot) {
+ ).si_then([=, this, &ctx](auto _cmroot) {
return seastar::do_with(
_cmroot,
- [=, &ctx](auto &cmroot) {
+ [=, this, &ctx](auto &cmroot) {
return collection_manager->remove(
cmroot,
*ctx.transaction,
cid
- ).si_then([=, &ctx, &cmroot] {
+ ).si_then([this, &ctx, &cmroot] {
// param here denotes whether it already existed, probably error
if (cmroot.must_update()) {
transaction_manager->write_collection_root(
LOG_PREFIX(BlockSegmentManager::mount);
return open_device(
device_path
- ).safe_then([=](auto p) {
+ ).safe_then([=, this](auto p) {
device = std::move(p.first);
auto sd = p.second;
return read_superblock(device, sd);
- }).safe_then([=](auto sb) {
+ }).safe_then([=, this](auto sb) {
set_device_id(sb.config.spec.id);
INFO("{} read {}", device_id_printer_t{get_device_id()}, sb);
sb.validate();
seastar::stat_data{},
block_sm_superblock_t{},
std::unique_ptr<SegmentStateTracker>(),
- [=](auto &device, auto &stat, auto &sb, auto &tracker)
+ [=, this](auto &device, auto &stat, auto &sb, auto &tracker)
{
check_create_device_ret maybe_create = check_create_device_ertr::now();
using crimson::common::get_conf;
t,
laddr,
len
- ).si_then([=, &t](lba_pin_list_t pin_list) {
+ ).si_then([=, this, &t](lba_pin_list_t pin_list) {
return seastar::do_with(
std::list<CachedExtentRef>(),
std::move(pin_list),
- [=, &t](std::list<CachedExtentRef> &list, lba_pin_list_t &pin_list) {
+ [=, this, &t](std::list<CachedExtentRef> &list, lba_pin_list_t &pin_list) {
auto &seg_addr = addr.as_seg_paddr();
auto seg_addr_id = seg_addr.get_segment_id();
- return trans_intr::parallel_for_each(pin_list, [=, &seg_addr, &list, &t](LBAPinRef &pin) ->
+ return trans_intr::parallel_for_each(pin_list, [=, this, &seg_addr, &list, &t](LBAPinRef &pin) ->
Cache::get_extent_iertr::future<> {
auto pin_laddr = pin->get_key();
auto pin_paddr = pin->get_val();
}
return seastar::do_with(ceph::os::Transaction{},
- [=](auto& t) {
- return pg_shard_manager.store_maps(t, start, m).then([=, &t] {
+ [=, this](auto& t) {
+ return pg_shard_manager.store_maps(t, start, m).then([=, this, &t] {
// even if this map isn't from a mon, we may have satisfied our subscription
monc->sub_got("osdmap", last);
if (!superblock.oldest_map || skip_maps) {
pg_shard_manager.get_meta_coll().collection(),
std::move(t));
});
- }).then([=] {
+ }).then([=, this] {
// TODO: write to superblock and commit the transaction
return committed_osd_maps(start, last, m);
});
do_osd_ops_success_func_t success_func,
do_osd_ops_failure_func_t failure_func)
{
- return seastar::do_with(std::move(msg_params), [=, &ops, &op_info]
+ return seastar::do_with(std::move(msg_params), [=, this, &ops, &op_info]
(auto &msg_params) {
return do_osd_ops_execute<void>(
seastar::make_lw_shared<OpsExecuter>(
reply->set_reply_versions(peering_state.get_info().last_update,
peering_state.get_info().last_user_version);
return seastar::make_ready_future<MURef<MOSDOpReply>>(std::move(reply));
- }).handle_exception_type_interruptible([=](const crimson::osd::error& e) {
+ }).handle_exception_type_interruptible([=, this](const crimson::osd::error& e) {
auto reply = crimson::make_message<MOSDOpReply>(
m.get(), -e.code().value(), get_osdmap_epoch(), 0, false);
reply->set_enoent_reply_versions(peering_state.get_info().last_update,
trigger,
pg->get_recovery_backend()->recover_object(soid, need)
.handle_exception_interruptible(
- [=, soid = std::move(soid)] (auto e) {
+ [=, this, soid = std::move(soid)] (auto e) {
on_failed_recover({ pg->get_pg_whoami() }, soid, need);
return seastar::make_ready_future<>();
})
return pg->get_recovery_backend()->add_recovering(soid).wait_track_blocking(
trigger,
pg->get_recovery_backend()->push_delete(soid, need).then_interruptible(
- [=] {
+ [=, this] {
object_stat_sum_t stat_diff;
stat_diff.num_objects_recovered = 1;
on_global_recover(soid, stat_diff, true);
trigger,
pg->get_recovery_backend()->recover_object(soid, need)
.handle_exception_interruptible(
- [=, soid = std::move(soid)] (auto e) {
+ [=, this, soid = std::move(soid)] (auto e) {
on_failed_recover({ pg->get_pg_whoami() }, soid, need);
return seastar::make_ready_future<>();
})
// 1. get the extents in the interested range
return interruptor::make_interruptible(backend->fiemap(coll, ghobject_t{oid},
0, copy_subset.range_end())).safe_then_interruptible(
- [=](auto&& fiemap_included) mutable {
+ [=, this](auto&& fiemap_included) mutable {
interval_set<uint64_t> extents;
try {
extents.intersection_of(copy_subset, std::move(fiemap_included));