]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: reap collection after all pending ios done 11797/head
authorHaomai Wang <haomai@xsky.com>
Sat, 5 Nov 2016 18:55:24 +0000 (02:55 +0800)
committerHaomai Wang <haomai@xsky.com>
Sat, 5 Nov 2016 18:55:24 +0000 (02:55 +0800)
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 <haomai@xsky.com>
src/os/bluestore/BlueStore.cc

index 78b06c3bbb3d04ab63d1a48d522cf651bd4bedeb..f7200a43a809914b4509819cd024f7acd5046e70 100644 (file)
@@ -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;