]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: audit buffer bytes before applying delta 9959/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 27 Jun 2016 13:44:12 +0000 (21:44 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 27 Jun 2016 13:44:12 +0000 (21:44 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index e75b7a155cf0d56663d52cc49296eb623e7bc355..c4acf8e76be03dd1ff1ec16f626c18d18263536d 100644 (file)
@@ -683,6 +683,7 @@ void BlueStore::TwoQCache::_adjust_buffer_size(Buffer *b, int64_t delta)
 {
   dout(20) << __func__ << " delta " << delta << " on " << *b << dendl;
   if (!b->is_empty()) {
+    assert((int64_t)buffer_bytes + delta >= 0);
     buffer_bytes += delta;
   }
 }