]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: shutdown allocator of bluefs more gracefully
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 23 Jun 2016 06:21:53 +0000 (14:21 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 23 Jun 2016 12:07:25 +0000 (20:07 +0800)
The new BitAllocator requires we call shutdown() explicitly,
thus we shall fix it here before we apply to the new BitAllocator.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueFS.cc

index 08b3ad1682dbcf967ce44f3f9554fbc8db1fca70..07d5e408a18da8c74276197dd18efd0e8f538201 100644 (file)
@@ -318,7 +318,10 @@ void BlueFS::_stop_alloc()
 {
   dout(20) << __func__ << dendl;
   for (auto p : alloc) {
-    delete p;
+    if (p != nullptr)  {
+      p->shutdown();
+      delete p;
+    }
   }
   alloc.clear();
 }