]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore/bluefs: Clear pending releases
authorAdam Kupczyk <akupczyk@ibm.com>
Mon, 10 Mar 2025 17:12:59 +0000 (17:12 +0000)
committerAdam Kupczyk <akupczyk@ibm.com>
Fri, 28 Mar 2025 16:06:02 +0000 (16:06 +0000)
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 <akupczyk@ibm.com>
src/os/bluestore/BlueFS.cc

index c68d5d252926bb73ff85aa343ba51171cb104b49..5f048d7f5ed65124523d1d18f01f8194c6afa62b 100644 (file)
@@ -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();