From 19ceddde3770282d4e2f23d53841ea5e71dd73d8 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 24 Dec 2020 09:46:55 +0800 Subject: [PATCH] client: fix the cache size check Only when the cache shrank will it make sense to notify the unmount. Signed-off-by: Xiubo Li --- src/client/Client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.47.3