From: Xiubo Li Date: Mon, 25 Oct 2021 07:18:03 +0000 (+0800) Subject: mds: do not trim cache when creating system file X-Git-Tag: v16.2.7~29^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e6250a83f9547df75c714d00eb43bf0f4823ea55;p=ceph.git mds: do not trim cache when creating system file Fixes: https://tracker.ceph.com/issues/51023 Signed-off-by: Xiubo Li (cherry picked from commit 138fea6a7638697acb1a9e824db7b8d04ad8d671) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 4533cfde1baa..1b61aadad7fb 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13242,7 +13242,9 @@ void MDCache::upkeep_main(void) if (active_with_clients) { trim_client_leases(); } - trim(); + if (is_open()) { + trim(); + } if (active_with_clients) { auto recall_flags = Server::RecallFlags::ENFORCE_MAX|Server::RecallFlags::ENFORCE_LIVENESS; if (cache_toofull()) {