From: Adam Kupczyk Date: Wed, 12 Mar 2025 09:55:00 +0000 (+0000) Subject: os/bluestore/write-v2: Tune down usage of 'unused' X-Git-Tag: testing/wip-vshankar-testing-20250407.170244-debug~42^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=13bdda03bedf51d3e051b69cef6f2efb2e9def72;p=ceph-ci.git os/bluestore/write-v2: Tune down usage of 'unused' We should not use 'unused' when allocation unit = disk block. Blobs with 'unused' cannot be split which makes shard resharding more problematic and spanning blobs more pronounced. Signed-off-by: Adam Kupczyk --- diff --git a/src/os/bluestore/Writer.cc b/src/os/bluestore/Writer.cc index 73a9efcd7ca..eeecbf01530 100644 --- a/src/os/bluestore/Writer.cc +++ b/src/os/bluestore/Writer.cc @@ -499,7 +499,9 @@ BlueStore::BlobRef BlueStore::Writer::_blob_create_with_data( _get_disk_space(blob_length - alloc_offset, blob_allocs); bblob.allocated(alloc_offset, blob_length - alloc_offset, blob_allocs); //^sets also logical_length = blob_length - bblob.add_unused_all(); + if (min_alloc_size != block_size) { + bblob.add_unused_all(); + } dout(25) << __func__ << " @0x" << std::hex << in_blob_offset << "~" << disk_data.length() << " alloc_offset=" << alloc_offset