From 9e35ac192e0fd3896c157b7de16b3061a3aa5ae6 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Thu, 23 Jun 2016 14:21:53 +0800 Subject: [PATCH] os/bluestore: shutdown allocator of bluefs more gracefully 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 --- src/os/bluestore/BlueFS.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index 08b3ad1682dbc..07d5e408a18da 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -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(); } -- 2.39.5