start,
end,
bitmap_op_types_t::ALL_CLEAR
- ).safe_then([this, b_block, start]() mutable {
+ ).safe_then([this, b_block]() mutable {
/*
* Set rest of the block bitmap, which is not used, to 1
* To do so, we only mark 1 to empty bitmap blocks
logger().debug("path {}", path);
return _open_device(path).safe_then([this, &config]() {
return read_rbm_header(config.start
- ).safe_then([this, &config](auto super) {
+ ).safe_then([](auto super) {
logger().debug(" already exists ");
return mkfs_ertr::now();
}).handle_error(
addr,
bp
).safe_then(
- [&bp, &addr, size, &allocated, &t, &alloc_extent, this]() mutable {
+ [&bp, &addr, size, &allocated, &alloc_extent, this]() mutable {
logger().debug("find_free_list: allocate {}, addr {}", allocated, addr);
rbm_bitmap_block_t b_block(super.block_size);
bufferlist bl_bitmap_block;
}
return find_block_ertr::make_ready_future<bool>(false);
});
- }).safe_then([&allocated, &alloc_extent, &t, size, this] () {
+ }).safe_then([&allocated, &alloc_extent, size, this] () {
logger().debug(" allocated: {} size {} ",
allocated * super.block_size, size);
if (allocated * super.block_size < size) {
*
*/
return find_free_block(t, size
- ).safe_then([this, &t, size] (auto alloc_extent) mutable
+ ).safe_then([] (auto alloc_extent) mutable
-> allocate_ertr::future<> {
logger().debug("after find_free_block: allocated {}", alloc_extent);
if (!alloc_extent.empty()) {
return device->read(
next_addr,
bptr).safe_then(
- [bptr, bl_bitmap_block, start, end, op, addr, this]() mutable {
+ [bptr, bl_bitmap_block, end, op, addr, this]() mutable {
rbm_bitmap_block_t b_block(super.block_size);
bufferlist block;
block.append(bptr);
[&, this] (auto &alloc_blocks) mutable {
return crimson::do_for_each(
alloc_blocks,
- [this, &alloc_blocks](auto &alloc) {
+ [this](auto &alloc) {
return crimson::do_for_each(
alloc.alloc_blk_ids,
[this, &alloc] (auto &range) -> write_ertr::future<> {
const std::string path)
{
ceph_assert(device);
- return device->open(path, seastar::open_flags::rw
- ).safe_then([this] {
- return open_ertr::now();
- });
+ return device->open(path, seastar::open_flags::rw);
}
NVMeManager::write_ertr::future<> NVMeManager::write_rbm_header()
iter.copy(bl.length(), bp.c_str());
return device->write(super.start, bp
- ).safe_then([this]() {
+ ).safe_then([] {
return write_ertr::now();
});
}
assert((length % block_size) == 0);
return device.dma_write(offset, bptr.c_str(), length).handle_exception(
- [length](auto e) -> write_ertr::future<size_t> {
+ [](auto e) -> write_ertr::future<size_t> {
logger().error("write: dma_write got error{}", e);
return crimson::ct_error::input_output_error::make();
}).then([length](auto result) -> write_ertr::future<> {
assert((length % block_size) == 0);
return device.dma_read(offset, bptr.c_str(), length).handle_exception(
- [length](auto e) -> read_ertr::future<size_t> {
+ [](auto e) -> read_ertr::future<size_t> {
logger().error("read: dma_read got error{}", e);
return crimson::ct_error::input_output_error::make();
}).then([length](auto result) -> read_ertr::future<> {