]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not trim cache when creating system file 41667/head
authorXiubo Li <xiubli@redhat.com>
Mon, 25 Oct 2021 07:18:03 +0000 (15:18 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 25 Oct 2021 07:20:11 +0000 (15:20 +0800)
Fixes: https://tracker.ceph.com/issues/51023
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/MDCache.cc

index 570bc892330c1bf7cb408bb3c3ddc7196ebdb970..315fc137cb3e85640b91654b74a2ce9d225853af 100644 (file)
@@ -13273,7 +13273,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()) {