]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: cosmetic cleanups
authorIgor Fedotov <ifedotov@suse.com>
Fri, 6 Aug 2021 12:09:40 +0000 (15:09 +0300)
committerNeha Ojha <nojha@redhat.com>
Thu, 12 Aug 2021 18:52:27 +0000 (18:52 +0000)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 080531d6813b868eda562cf27babe18d8a974413)

src/os/bluestore/BlueStore.cc

index 9a8295e933f1db52623d6ad8fed7e8325ec8f748..5efc40ce3f1985f4a4398a56981eb9479cdf44ad 100644 (file)
@@ -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);