From: xie xingguo Date: Thu, 23 Jun 2016 12:09:01 +0000 (+0800) Subject: os/bluestore: add sanity check for underflow X-Git-Tag: v11.0.0~68^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=86944f0ea1608b8a71a9d7ed95475405b05e3f45;p=ceph-ci.git os/bluestore: add sanity check for underflow Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 2df10447646..1ac611b0f73 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -659,6 +659,7 @@ public: void _rm_buffer(Buffer *b) override { if (!b->is_empty()) { + assert(buffer_bytes >= b->length); buffer_bytes -= b->length; } switch (b->cache_private) {