From: Xiubo Li Date: Thu, 24 Dec 2020 01:46:55 +0000 (+0800) Subject: client: fix the cache size check X-Git-Tag: v16.1.0~101^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38698%2Fhead;p=ceph.git client: fix the cache size check Only when the cache shrank will it make sense to notify the unmount. Signed-off-by: Xiubo Li --- diff --git a/src/client/Client.cc b/src/client/Client.cc index a0ef9720fe8e..a6e2199ed3fc 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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 {