From: Igor Fedotov Date: Mon, 3 Feb 2020 15:50:50 +0000 (+0300) Subject: os/bluestore: do not use 'unused' bitmap if makes no sense. X-Git-Tag: v15.2.2~39^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=18f29697be55fc4f4fa71113a5d05a8abdd2624c;p=ceph.git os/bluestore: do not use 'unused' bitmap if makes no sense. The processing logic which relies on 'unused' bitmap makes sense for bluestore setup where min alloc size is different from device block size. Now omitting if that's not true. Signed-off-by: Igor Fedotov (cherry picked from commit f960a018f938c70ea3d7f031611cdc5a6b9955b1) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7a64b1c0d28..1ccfbac9a21 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -13235,7 +13235,10 @@ void BlueStore::_do_write_small( uint64_t b_off0 = b_off; _pad_zeros(&bl, &b_off0, block_size); o->extent_map.punch_hole(c, offset, length, &wctx->old_extents); - wctx->write(offset, b, alloc_len, b_off0, bl, b_off, length, true, true); + wctx->write(offset, b, alloc_len, b_off0, bl, b_off, length, + min_alloc_size != block_size, // use 'unused' bitmap when alloc granularity + // doesn't match disk one only + true); return; }