From: Igor Fedotov Date: Fri, 6 Aug 2021 12:09:40 +0000 (+0300) Subject: os/bluestore: cosmetic cleanups X-Git-Tag: v16.2.6~72^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d450f93a8953afc9aedcea82af234547a67d36ef;p=ceph.git os/bluestore: cosmetic cleanups Signed-off-by: Igor Fedotov (cherry picked from commit 080531d6813b868eda562cf27babe18d8a974413) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 9a8295e933f1..5efc40ce3f19 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -14060,8 +14060,7 @@ int BlueStore::_do_alloc_write( auto prealloc_pos = prealloc.begin(); for (auto& wi : wctx->writes) { - BlobRef b = wi.b; - bluestore_blob_t& dblob = b->dirty_blob(); + bluestore_blob_t& dblob = wi.b->dirty_blob(); uint64_t b_off = wi.b_off; bufferlist *l = &wi.bl; uint64_t final_length = wi.blob_length; @@ -14073,7 +14072,8 @@ int BlueStore::_do_alloc_write( l = &wi.compressed_bl; dblob.set_compressed(wi.blob_length, wi.compressed_len); if (csum != Checksummer::CSUM_NONE) { - dout(20) << __func__ << " initialize csum setting for compressed blob " << *b + dout(20) << __func__ + << " initialize csum setting for compressed blob " << *wi.b << " csum_type " << Checksummer::get_csum_type_string(csum) << " csum_order " << csum_order << " csum_length 0x" << std::hex << csum_length @@ -14108,7 +14108,8 @@ int BlueStore::_do_alloc_write( b_off = suggested_boff; } if (csum != Checksummer::CSUM_NONE) { - dout(20) << __func__ << " initialize csum setting for new blob " << *b + dout(20) << __func__ + << " initialize csum setting for new blob " << *wi.b << " csum_type " << Checksummer::get_csum_type_string(csum) << " csum_order " << csum_order << " csum_length 0x" << std::hex << csum_length << std::dec @@ -14142,7 +14143,7 @@ int BlueStore::_do_alloc_write( } dblob.allocated(p2align(b_off, min_alloc_size), final_length, extents); - dout(20) << __func__ << " blob " << *b << dendl; + dout(20) << __func__ << " blob " << *wi.b << dendl; if (dblob.has_csum()) { dblob.calc_csum(b_off, *l); } @@ -14177,7 +14178,7 @@ int BlueStore::_do_alloc_write( << l->length() << std::dec << " write via deferred" << dendl; bluestore_deferred_op_t *op = _get_deferred_op(txc); op->op = bluestore_deferred_op_t::OP_WRITE; - int r = b->get_blob().map( + int r = wi.b->get_blob().map( b_off, l->length(), [&](uint64_t offset, uint64_t length) { op->extents.emplace_back(bluestore_pextent_t(offset, length)); @@ -14187,7 +14188,7 @@ int BlueStore::_do_alloc_write( op->data = *l; logger->inc(l_bluestore_write_deferred); } else { - b->get_blob().map_bl( + wi.b->get_blob().map_bl( b_off, *l, [&](uint64_t offset, bufferlist& t) { bdev->aio_write(offset, t, &txc->ioc, false);