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: v15.2.16~42^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d2fe39542452698f545f698bb725e8e3b94d8f56;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 2e7cad369ba69..adf46a839e61e 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13358,7 +13358,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()) {