From 9e4c576aa60c1b42132ff8c9c4e91534a4202b02 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 19 Oct 2021 15:09:37 -0500 Subject: [PATCH] os/bluestore: fix cleaner race with collection removal Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 92bead276ae05..b4d53766889ae 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -13176,6 +13176,10 @@ void BlueStore::_clean_some(ghobject_t oid, uint32_t zone) << dendl; CollectionRef cref = _get_collection_by_oid(oid); + if (!cref) { + dout(10) << __func__ << " can't find collection for " << oid << dendl; + return; + } Collection *c = cref.get(); // serialize io dispatch vs other transactions @@ -13184,7 +13188,7 @@ void BlueStore::_clean_some(ghobject_t oid, uint32_t zone) auto o = c->get_onode(oid, false); if (!o) { - derr << __func__ << " can't find " << oid << dendl; + dout(10) << __func__ << " can't find " << oid << dendl; return; } -- 2.39.5