From 09fd806e23f18c38619697b1d9d834d260cf54b0 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Mon, 10 Mar 2025 17:12:59 +0000 Subject: [PATCH] os/bluestore/bluefs: Clear pending releases If we happen to shutdown with dirty.pending_releases, after mount we will most likely want to free them. And its an error - they will already be free. Signed-off-by: Adam Kupczyk --- src/os/bluestore/BlueFS.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueFS.cc b/src/os/bluestore/BlueFS.cc index c68d5d25292..5f048d7f5ed 100644 --- a/src/os/bluestore/BlueFS.cc +++ b/src/os/bluestore/BlueFS.cc @@ -1165,7 +1165,11 @@ void BlueFS::umount(bool avoid_compact) _close_writer(log.writer); log.writer = NULL; log.t.clear(); - + // if we umount with pending release, we can possibly mount again + // with pending release, and will release something that is not allocated + for (auto& d: dirty.pending_release) { + d.clear(); + } vselector.reset(nullptr); _stop_alloc(); nodes.file_map.clear(); -- 2.39.5