From 50884818e151c569cc0001053a5ade08cf9288ef Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 7 Oct 2016 09:49:28 +0800 Subject: [PATCH] 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 --- src/os/bluestore/BlueStore.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ce673dab018bc..5a252dd684e19 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; -- 2.39.5