Skip to content

Instantly share code, notes, and snippets.

@jdurgin
Created October 21, 2019 20:42
Show Gist options
  • Select an option

  • Save jdurgin/f8f8b007d325ce9c424086b6a2dc0b69 to your computer and use it in GitHub Desktop.

Select an option

Save jdurgin/f8f8b007d325ce9c424086b6a2dc0b69 to your computer and use it in GitHub Desktop.
Mark's onode trimming simple patch
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