]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not trim cache when creating system file 43815/head
authorXiubo Li <xiubli@redhat.com>
Mon, 25 Oct 2021 07:18:03 +0000 (15:18 +0800)
committerXiubo Li <xiubli@redhat.com>
Fri, 5 Nov 2021 02:52:55 +0000 (10:52 +0800)
Fixes: https://tracker.ceph.com/issues/51023
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit 138fea6a7638697acb1a9e824db7b8d04ad8d671)

src/mds/MDCache.cc

index 4533cfde1baa8d30e94572fc6340c72d7f4f0f38..1b61aadad7fb1fcf64c8e9d660da08e86299bc19 100644 (file)
@@ -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()) {