diff options
author | Aravind <aravind.ramesh@wdc.com> | 2022-09-01 09:31:43 +0200 |
---|---|---|
committer | Aravind <aravind.ramesh@wdc.com> | 2022-09-02 07:07:05 +0200 |
commit | 0379026f9c57691f658a114476033cb44a53bda2 (patch) | |
tree | 404f7161fb788d0fe84159d7dc9d9ca0a51866bb /src/crimson/os/seastore/segment_manager | |
parent | crimson/block: Rename Device::get_size() to get_available_size() (diff) | |
download | ceph-0379026f9c57691f658a114476033cb44a53bda2.tar.xz ceph-0379026f9c57691f658a114476033cb44a53bda2.zip |
crimson/zns: fix compilation warnings for C++20.
Fix the following warning which is manifesting as a result of
the ceph adopting C++20.
warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com>
Diffstat (limited to 'src/crimson/os/seastore/segment_manager')
-rw-r--r-- | src/crimson/os/seastore/segment_manager/zns.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/crimson/os/seastore/segment_manager/zns.cc b/src/crimson/os/seastore/segment_manager/zns.cc index 6f3f22465bb..ccf7eb1ee27 100644 --- a/src/crimson/os/seastore/segment_manager/zns.cc +++ b/src/crimson/os/seastore/segment_manager/zns.cc @@ -309,11 +309,11 @@ ZNSSegmentManager::mount_ret ZNSSegmentManager::mount() { return open_device( device_path, seastar::open_flags::rw - ).safe_then([=](auto p) { + ).safe_then([=, this](auto p) { device = std::move(p.first); auto sd = p.second; return read_metadata(device, sd); - }).safe_then([=](auto meta){ + }).safe_then([=, this](auto meta){ metadata = meta; return mount_ertr::now(); }); @@ -331,11 +331,11 @@ ZNSSegmentManager::mkfs_ret ZNSSegmentManager::mkfs( size_t(), size_t(), size_t(), - [=](auto &device, auto &stat, auto &sb, auto &zone_size_sects, auto &nr_zones, auto &size) { + [=, this](auto &device, auto &stat, auto &sb, auto &zone_size_sects, auto &nr_zones, auto &size) { return open_device( device_path, seastar::open_flags::rw - ).safe_then([=, &device, &stat, &sb, &zone_size_sects, &nr_zones, &size](auto p) { + ).safe_then([=, this, &device, &stat, &sb, &zone_size_sects, &nr_zones, &size](auto p) { device = p.first; stat = p.second; return device.ioctl( @@ -423,7 +423,7 @@ ZNSSegmentManager::open_ertr::future<SegmentRef> ZNSSegmentManager::open( LOG_PREFIX(ZNSSegmentManager::open); return seastar::do_with( blk_zone_range{}, - [=](auto &range) { + [=, this](auto &range) { range = make_range( id, metadata.segment_size, @@ -433,7 +433,7 @@ ZNSSegmentManager::open_ertr::future<SegmentRef> ZNSSegmentManager::open( range ); } - ).safe_then([=] { + ).safe_then([=, this] { DEBUG("segment {}, open successful", id); return open_ertr::future<SegmentRef>( open_ertr::ready_future_marker{}, @@ -528,7 +528,7 @@ ZNSSegmentManager::release_ertr::future<> ZNSSegmentManager::release( DEBUG("Resetting zone/segment {}", id); return seastar::do_with( blk_zone_range{}, - [=](auto &range) { + [=, this](auto &range) { range = make_range( id, metadata.segment_size, @@ -576,7 +576,7 @@ Segment::close_ertr::future<> ZNSSegmentManager::segment_close( LOG_PREFIX(ZNSSegmentManager::segment_close); return seastar::do_with( blk_zone_range{}, - [=](auto &range) { + [=, this](auto &range) { range = make_range( id, metadata.segment_size, |