]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueFS: prevent BlueFS::dirty_files from being leaked when syncing metadata 30631/head
authorXuehan Xu <xxhdx1985126@163.com>
Sun, 29 Sep 2019 04:21:09 +0000 (12:21 +0800)
committerXuehan Xu <xxhdx1985126@163.com>
Sun, 29 Sep 2019 04:21:09 +0000 (12:21 +0800)
Fixes: https://tracker.ceph.com/issues/42091
Signed-off-by: Xuehan Xu <xxhdx1985126@163.com>
src/os/bluestore/BlueFS.cc

index 9430b654b9b4cc11cefcabeebd04bf05a325dae0..2885d144bfeeac4a6dce2f505199f2b923446c83 100644 (file)
@@ -2785,7 +2785,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;