]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: simplify blob status checking for small writes
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 7 Oct 2016 01:49:28 +0000 (09:49 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 7 Oct 2016 01:49:28 +0000 (09:49 +0800)
If a blob is marked as compressed and still mutable, something
is wrong.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index ce673dab018bc364352c765b2df9e481eb976e94..5a252dd684e197f58367d44176891675eaca0159 100644 (file)
@@ -7265,7 +7265,8 @@ void BlueStore::_do_write_small(
   if (ep != o->extent_map.extent_map.begin()) {
     --ep;
     b = ep->blob;
-    if (ep->logical_offset - ep->blob_offset + b->get_blob().get_ondisk_length() <= offset) {
+    if (ep->logical_offset - ep->blob_offset +
+      b->get_blob().get_ondisk_length() <= offset) {
       ++ep;
     }
   }
@@ -7274,7 +7275,7 @@ void BlueStore::_do_write_small(
       break;
     }
     b = ep->blob;
-    if (!b->get_blob().is_mutable() || b->get_blob().is_compressed()) {
+    if (!b->get_blob().is_mutable()) {
       dout(20) << __func__ << " ignoring immutable " << *b << dendl;
       ++ep;
       continue;