]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: assert available of stat doesn't underflow
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 18 Jul 2016 07:49:04 +0000 (15:49 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 18 Jul 2016 07:49:04 +0000 (15:49 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 8f1548a7c9762b48198a1f773e59924b8660ef8d..af987e1f837df1190f73b8643043ffaa2831a6b4 100644 (file)
@@ -3268,6 +3268,7 @@ int BlueStore::statfs(struct store_statfs_t *buf)
 
   buf->reset();
   buf->total = bdev->get_size();
+  assert(alloc->get_free() >= bluefs_len);
   buf->available = (alloc->get_free() - bluefs_len);
 
   bufferlist bl;