mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
os/bluestore: fix potential assert in cache _trim method.
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
This commit is contained in:
parent
9ee28c364f
commit
8b633f0bbc
@ -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="<<onode_lru.size()<< dendl;
|
||||
if (p != onode_lru.begin()) {
|
||||
onode_lru.erase(p--);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user