]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: trim cache after journal flush 26215/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 22 Jan 2019 20:12:55 +0000 (12:12 -0800)
committerPrashant D <pdhange@redhat.com>
Wed, 30 Jan 2019 23:10:01 +0000 (18:10 -0500)
Dropping cache should trim the cache only after journal flush otherwise dirty
inodes will remain pinned in cache.

Fixes: http://tracker.ceph.com/issues/38010
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d7f6c1583b4162fade434e376176f3068472f53f)

src/mds/MDSRank.cc

index b196b5044ba280f43575952b86f6346909699c3c..22069a9313dfb9baf843beefb25107667d98ba5f 100644 (file)
@@ -347,18 +347,6 @@ private:
     f->close_section();
 
     // we can still continue after recall timeout
-    trim_cache();
-  }
-
-  void trim_cache() {
-    dout(20) << __func__ << dendl;
-
-    if (!mdcache->trim(UINT64_MAX)) {
-      cmd_err(f, "failed to trim cache");
-      complete(-EINVAL);
-      return;
-    }
-
     flush_journal();
   }
 
@@ -388,6 +376,18 @@ private:
     f->dump_string("message", ss.str());
     f->close_section();
 
+    trim_cache();
+  }
+
+  void trim_cache() {
+    dout(20) << __func__ << dendl;
+
+    if (!mdcache->trim(UINT64_MAX)) {
+      cmd_err(f, "failed to trim cache");
+      complete(-EINVAL);
+      return;
+    }
+
     cache_status();
   }