]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: use single bufferlist:splice() call.
authorIgor Fedotov <igor.fedotov@croit.io>
Wed, 27 Aug 2025 19:13:23 +0000 (22:13 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 2 Jun 2026 19:31:43 +0000 (22:31 +0300)
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/BlueStore.cc

index b90d7054dea9f5b6afc8bf9f6a8003757ea63e50..f76e4f6c1ef829e3c9a493580531d62545edf3d6 100644 (file)
@@ -17985,8 +17985,7 @@ int BlueStore::_do_write_v2(
         uint32_t this_segment_end = this_segment_begin + segment_size;
         uint32_t write_length = std::min(this_segment_end, end) - write_offset;
         bufferlist chunk;
-        chunk.substr_of(bl, 0, write_length);
-        bl.splice(0, write_length);
+        bl.splice(0, write_length, &chunk);
         _do_write_v2_compressed(txc, c, o, wctx, write_offset, write_length, chunk,
                                 this_segment_begin, this_segment_end);
         write_offset += write_length;