Skip to content

Commit 13bdda0

Browse files
committed
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 <[email protected]>
1 parent 21f67af commit 13bdda0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/os/bluestore/Writer.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ BlueStore::BlobRef BlueStore::Writer::_blob_create_with_data(
499499
_get_disk_space(blob_length - alloc_offset, blob_allocs);
500500
bblob.allocated(alloc_offset, blob_length - alloc_offset, blob_allocs);
501501
//^sets also logical_length = blob_length
502-
bblob.add_unused_all();
502+
if (min_alloc_size != block_size) {
503+
bblob.add_unused_all();
504+
}
503505
dout(25) << __func__ << " @0x" << std::hex << in_blob_offset
504506
<< "~" << disk_data.length()
505507
<< " alloc_offset=" << alloc_offset

0 commit comments

Comments
 (0)