]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix the cache size check 38698/head
authorXiubo Li <xiubli@redhat.com>
Thu, 24 Dec 2020 01:46:55 +0000 (09:46 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 24 Dec 2020 02:15:56 +0000 (10:15 +0800)
Only when the cache shrank will it make sense to notify the unmount.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc

index a0ef9720fe8e849add64680eb1f74dabcfde2ee4..a6e2199ed3fcfa6362cef31ed14600cf4b719d14 100644 (file)
@@ -2711,7 +2711,7 @@ bool Client::ms_dispatch2(const MessageRef &m)
              << "+" << inode_map.size() << dendl;
     uint64_t size = lru.lru_get_size() + inode_map.size();
     trim_cache();
-    if (size < lru.lru_get_size() + inode_map.size()) {
+    if (size > lru.lru_get_size() + inode_map.size()) {
       ldout(cct, 10) << "unmounting: trim pass, cache shrank, poking unmount()" << dendl;
       mount_cond.notify_all();
     } else {