From: Patrick Donnelly Date: Tue, 22 Jan 2019 20:12:55 +0000 (-0800) Subject: mds: trim cache after journal flush X-Git-Tag: v14.1.0~290^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7f6c1583b4162fade434e376176f3068472f53f;p=ceph.git mds: trim cache after journal flush 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 --- diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 82eb2feafbb7..5e80b27607a9 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -344,18 +344,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(); } @@ -385,6 +373,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(); }