Created
October 21, 2019 20:42
-
-
Save jdurgin/f8f8b007d325ce9c424086b6a2dc0b69 to your computer and use it in GitHub Desktop.
Mark's onode trimming simple patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc | |
| index e1b7325..e7631e8 100644 | |
| --- a/src/os/bluestore/BlueStore.cc | |
| +++ b/src/os/bluestore/BlueStore.cc | |
| @@ -851,16 +851,21 @@ void BlueStore::LRUCache::_trim(uint64_t onode_max, uint64_t buffer_max) | |
| break; | |
| } else { | |
| p--; | |
| - num--; | |
| continue; | |
| } | |
| + } else { | |
| + skipped = 0; | |
| } | |
| + | |
| dout(30) << __func__ << " rm " << o->oid << dendl; | |
| if (p != onode_lru.begin()) { | |
| onode_lru.erase(p--); | |
| } else { | |
| onode_lru.erase(p); | |
| - assert(num == 1); | |
| + if (num > 0) { | |
| + dout(20) << __func__ << " was unable to trim " << num | |
| + << " onode(s) due to pinning." << dendl; | |
| + } | |
| } | |
| o->get(); // paranoia | |
| o->c->onode_map.remove(o->oid); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment