diff options
author | Kefu Chai <kchai@redhat.com> | 2021-05-07 06:59:14 +0200 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2021-05-07 07:55:48 +0200 |
commit | 88e7356af157a788589f4a17e517bcb98f53578a (patch) | |
tree | c0b5d4c42779426e64200328e38119d06bf645ed /src/crimson/os | |
parent | Merge pull request #41211 from neha-ojha/wip-remove-mon-election (diff) | |
download | ceph-88e7356af157a788589f4a17e517bcb98f53578a.tar.xz ceph-88e7356af157a788589f4a17e517bcb98f53578a.zip |
crimson/os/seastore: do not capture unused variable
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/crimson/os')
4 files changed, 19 insertions, 19 deletions
diff --git a/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc b/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc index 1acde960b4e..cd8bf0b3d32 100644 --- a/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc +++ b/src/crimson/os/seastore/omap_manager/btree/omap_btree_node_impl.cc @@ -224,7 +224,7 @@ OMapInnerNode::list( oc, start, config.with_reduced_max(result.size()) - ).safe_then([&, config, this](auto &&child_ret) mutable { + ).safe_then([&, config](auto &&child_ret) mutable { auto &[child_complete, child_result] = child_ret; if (result.size() && child_result.size()) { assert(child_result.begin()->first > result.rbegin()->first); diff --git a/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.cc b/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.cc index b80e237e763..ddc99d2cd17 100644 --- a/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.cc +++ b/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.cc @@ -17,7 +17,7 @@ FLTreeOnodeManager::get_onode_ret FLTreeOnodeManager::get_onode( const ghobject_t &hoid) { return tree.find( trans, hoid - ).safe_then([this, &trans, &hoid](auto cursor) + ).safe_then([this, &hoid](auto cursor) -> get_onode_ret { if (cursor == tree.end()) { logger().debug( @@ -83,7 +83,7 @@ FLTreeOnodeManager::get_or_create_onodes( hoids, [this, &trans, &ret](auto &hoid) { return get_or_create_onode(trans, hoid - ).safe_then([this, &ret](auto &&onoderef) { + ).safe_then([&ret](auto &&onoderef) { ret.push_back(std::move(onoderef)); }); }).safe_then([&ret] { diff --git a/src/crimson/os/seastore/seastore.cc b/src/crimson/os/seastore/seastore.cc index ad2bd1c8c4e..975026232b7 100644 --- a/src/crimson/os/seastore/seastore.cc +++ b/src/crimson/os/seastore/seastore.cc @@ -142,11 +142,11 @@ seastar::future<std::vector<coll_t>> SeaStore::list_collections() transaction_manager->create_transaction(), [this, &ret](auto &t) { return transaction_manager->read_collection_root(*t - ).safe_then([this, &ret, &t](auto coll_root) { + ).safe_then([this, &t](auto coll_root) { return collection_manager->list( coll_root, *t); - }).safe_then([this, &ret, &t](auto colls) { + }).safe_then([&ret](auto colls) { ret.resize(colls.size()); std::transform( colls.begin(), colls.end(), ret.begin(), @@ -224,7 +224,7 @@ SeaStore::get_attr_errorator::future<ceph::bufferlist> SeaStore::get_attr( BtreeOMapManager(*transaction_manager), layout.xattr_root.get(), std::string(name), - [&t, this](auto &manager, auto& root, auto& name) { + [&t](auto &manager, auto& root, auto& name) { if (root.is_null()) { return get_attr_ertr::make_ready_future<ceph::bufferlist>( ceph::bufferlist()); @@ -322,7 +322,7 @@ SeaStore::omap_get_values( return repeat_with_onode<omap_values_t>( c, oid, - [this, &oid, &keys](auto &t, auto &onode) -> int_ret_t { + [this, &keys](auto &t, auto &onode) -> int_ret_t { auto omap_root = onode.get_layout().omap_root.get(); if (omap_root.is_null()) { return seastar::make_ready_future<omap_values_t>(); @@ -331,11 +331,11 @@ SeaStore::omap_get_values( BtreeOMapManager(*transaction_manager), omap_root, omap_values_t(), - [&, this](auto &manager, auto &root, auto &ret) -> int_ret_t { + [&](auto &manager, auto &root, auto &ret) -> int_ret_t { return crimson::do_for_each( keys.begin(), keys.end(), - [&, this](auto &key) { + [&](auto &key) { return manager.omap_get_value( root, t, @@ -376,7 +376,7 @@ OMapManager::omap_list_ret SeaStore::_omap_list( BtreeOMapManager(*transaction_manager), root, start, - [&t, config, this](auto &manager, auto& root, auto& start) -> int_ret_t { + [&t, config](auto &manager, auto& root, auto& start) -> int_ret_t { return manager.omap_list(root, t, start, config); }); } @@ -396,7 +396,7 @@ SeaStore::omap_get_values_ret_t SeaStore::omap_list( return repeat_with_onode<ret_bare_t>( c, oid, - [this, config, &oid, &start](auto &t, auto &onode) -> int_ret_t { + [this, config, &start](auto &t, auto &onode) -> int_ret_t { return _omap_list(onode.get_layout().omap_root, t, start, config) .safe_then([](auto&& p) { return seastar::make_ready_future<ret_bare_t>( @@ -744,7 +744,7 @@ SeaStore::__omap_set_kvs( return seastar::do_with( BtreeOMapManager(*transaction_manager), omap_root.get(), - [&t, this, keys=std::move(kvs)](auto &omap_manager, auto &root) { + [&t, keys=std::move(kvs)](auto &omap_manager, auto &root) { tm_ertr::future<> maybe_create_root = !root.is_null() ? tm_ertr::now() : @@ -754,12 +754,12 @@ SeaStore::__omap_set_kvs( }); return maybe_create_root.safe_then( - [&, keys=std::move(keys), this]() mutable { + [&, keys=std::move(keys)]() mutable { return omap_manager.omap_set_keys(root, t, std::move(keys)); - }).safe_then([&, this] { + }).safe_then([&] { return tm_ertr::make_ready_future<omap_root_t>(std::move(root)); }); - }).safe_then([this, &mutable_omap_root](auto root) { + }).safe_then([&mutable_omap_root](auto root) { if (root.must_update()) { mutable_omap_root.update(root); } @@ -816,12 +816,12 @@ SeaStore::tm_ret SeaStore::_omap_rmkeys( return crimson::do_for_each( keys.begin(), keys.end(), - [&, this](auto &p) { + [&](auto &p) { return omap_manager.omap_rm_key( omap_root, *ctx.transaction, p); - }).safe_then([&, this] { + }).safe_then([&] { if (omap_root.must_update()) { onode->get_mutable_layout(*ctx.transaction ).omap_root.update(omap_root); diff --git a/src/crimson/os/seastore/seastore.h b/src/crimson/os/seastore/seastore.h index f53ad97dcc5..1353bab33ce 100644 --- a/src/crimson/os/seastore/seastore.h +++ b/src/crimson/os/seastore/seastore.h @@ -187,7 +187,7 @@ private: t = transaction_manager->create_transaction(); return onode_manager->get_onode( *t, oid - ).safe_then([&, this](auto onode_ret) { + ).safe_then([&](auto onode_ret) { onode = std::move(onode_ret); return f(*t, *onode); }).safe_then([&ret](auto _ret) { @@ -216,7 +216,7 @@ private: t = transaction_manager->create_transaction(); return onode_manager->get_onode( *t, oid - ).safe_then([&, this](auto onode_ret) { + ).safe_then([&](auto onode_ret) { onode = std::move(onode_ret); return f(*t, *onode); }).safe_then([&ret](auto _ret) { |