]> git.apps.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)
committerNathan Cutler <ncutler@suse.com>
Thu, 14 May 2020 11:02:53 +0000 (13:02 +0200)
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>
(cherry picked from commit f960a018f938c70ea3d7f031611cdc5a6b9955b1)

src/os/bluestore/BlueStore.cc

index f4181b6c754a48eadcd78ac3d0ffdabf5bd94366..f8c6eeea83789e9251f9a8d8a2b4d9332e3e6594 100644 (file)
@@ -12399,7 +12399,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;
 }