mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
os/bluestore: set min compressed blob size floor at 2x min_alloc_size
Otherwise there's not point in compressing--we won't be able to allocation a smaller space to store it. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
87f6d23b2f
commit
beed433254
@ -7687,6 +7687,13 @@ int BlueStore::_do_write(
|
||||
wctx.target_blob_size > g_conf->bluestore_max_blob_size) {
|
||||
wctx.target_blob_size = g_conf->bluestore_max_blob_size;
|
||||
}
|
||||
// set the min blob size floor at 2x the min_alloc_size, or else we
|
||||
// won't be able to allocate a smaller extent for the compressed
|
||||
// data.
|
||||
if (wctx.compress &&
|
||||
wctx.target_blob_size < min_alloc_size * 2) {
|
||||
wctx.target_blob_size = min_alloc_size * 2;
|
||||
}
|
||||
|
||||
dout(20) << __func__ << " prefer csum_order " << wctx.csum_order
|
||||
<< " target_blob_size 0x" << std::hex << wctx.target_blob_size
|
||||
|
Loading…
Reference in New Issue
Block a user