]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: add sanity check for compress()
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 14 Sep 2016 06:56:24 +0000 (14:56 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 14 Sep 2016 06:56:24 +0000 (14:56 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 61134bee93b0f9b843a67478a9eec87c52ec7b2f..c022e2ee05db8f2cbe7ace9669b3793cdec1358c 100644 (file)
@@ -7197,7 +7197,8 @@ int BlueStore::_do_alloc_write(
       // FIXME: memory alignment here is bad
       bufferlist t;
 
-      c->compress(*l, t);
+      r = c->compress(*l, t);
+      assert(r == 0);
 
       chdr.length = t.length();
       ::encode(chdr, compressed_bl);