]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueFS: prevent BlueFS::dirty_files from being leaked when syncing metadata 34515/head
authorXuehan Xu <xxhdx1985126@163.com>
Sun, 29 Sep 2019 04:21:09 +0000 (12:21 +0800)
committerShyukri Shyukriev <shshyukriev@suse.com>
Fri, 10 Apr 2020 19:57:34 +0000 (22:57 +0300)
Fixes: https://tracker.ceph.com/issues/42091
Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
(cherry picked from commit f1ae6d9555a1e1b7b61143dd1f867ea7afc2f8c4)

src/os/bluestore/BlueFS.cc

index 0d9680c43de439269dde95160ef8ae5e641d50a1..76e737fc698c077d5410cb803789fb89c07a87c5 100644 (file)
@@ -2748,7 +2748,7 @@ int BlueFS::_preallocate(FileRef f, uint64_t off, uint64_t len)
 void BlueFS::sync_metadata()
 {
   std::unique_lock l(lock);
-  if (log_t.empty()) {
+  if (log_t.empty() && dirty_files.empty()) {
     dout(10) << __func__ << " - no pending log events" << dendl;
   } else {
     dout(10) << __func__ << dendl;