From: xie xingguo Date: Fri, 7 Oct 2016 01:49:28 +0000 (+0800) Subject: os/bluestore: simplify blob status checking for small writes X-Git-Tag: v11.1.0~705^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50884818e151c569cc0001053a5ade08cf9288ef;p=ceph.git os/bluestore: simplify blob status checking for small writes If a blob is marked as compressed and still mutable, something is wrong. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ce673dab018b..5a252dd684e1 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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;