From f46527a934f682f68a7022038612ce9583fd7e5f Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Sun, 6 Nov 2016 02:55:24 +0800 Subject: [PATCH] os/bluestore: reap collection after all pending ios done Otherwise when umount finish reap and wait for pending io done, the last pending io may aim to remove collection and make removed_collection not empty. So the leaked collection ref will result in BlueStore deconstruction segment failt Signed-off-by: Haomai Wang --- src/os/bluestore/BlueStore.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 78b06c3bbb3..f7200a43a80 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -4175,8 +4175,6 @@ int BlueStore::umount() dout(1) << __func__ << dendl; _sync(); - _reap_collections(); - coll_map.clear(); mempool_thread.shutdown(); @@ -4192,6 +4190,8 @@ int BlueStore::umount() dout(20) << __func__ << " stopping finisher" << dendl; f->stop(); } + _reap_collections(); + coll_map.clear(); dout(20) << __func__ << " closing" << dendl; mounted = false; -- 2.39.5