]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: do not use 'unused' bitmap if makes no sense.
authorIgor Fedotov <ifedotov@suse.com>
Mon, 3 Feb 2020 15:50:50 +0000 (18:50 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 3 Feb 2020 20:23:02 +0000 (23:23 +0300)
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 <ifedotov@suse.com>
src/os/bluestore/BlueStore.cc

index efa7091591b7406a531c7f990844b76261678499..24c693da146ba9507d3d6f7adc82a0c8a40a6bcb 100644 (file)
@@ -13181,7 +13181,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;
 }