]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not trim cache when creating system file 43816/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 03:13:50 +0000 (11:13 +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 2e7cad369ba69a2ff63a177bf4e0e59f631e1b38..adf46a839e61e4d760eb1d7bef06a7b38e4e886a 100644 (file)
@@ -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()) {