From: Igor Fedotov Date: Thu, 2 Feb 2017 13:10:01 +0000 (+0000) Subject: os/bluestore: fix potential assert in cache _trim method. X-Git-Tag: v12.0.0~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b633f0bbcf8d9e6cacdf86f02a5662f681bda32;p=ceph.git os/bluestore: fix potential assert in cache _trim method. Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 49cd0a37d1f..aa9a09fb3ef 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -680,6 +680,7 @@ void BlueStore::LRUCache::_trim(uint64_t onode_max, uint64_t buffer_max) break; } else { p--; + num--; continue; } } @@ -946,10 +947,11 @@ void BlueStore::TwoQCache::_trim(uint64_t onode_max, uint64_t buffer_max) break; } else { p--; + num--; continue; } } - dout(30) << __func__ << " trim " << o->oid << dendl; + dout(30) << __func__ << " " << o->oid << " num=" << num <<" lru size="<