From: Haomai Wang Date: Sat, 5 Nov 2016 18:55:24 +0000 (+0800) Subject: os/bluestore: reap collection after all pending ios done X-Git-Tag: v11.1.0~391^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11797%2Fhead;p=ceph.git 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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 78b06c3bbb3d..f7200a43a809 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;