From: Xiubo Li Date: Wed, 23 Dec 2020 08:01:39 +0000 (+0800) Subject: client: skip putting inodes if map is empty X-Git-Tag: v16.1.0~101^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=476267c7589dbace63d2b793d5ed1d3f81eb4af6;p=ceph.git client: skip putting inodes if map is empty The delay_put_inodes() will be called by the tick() periodically per second, and when the _unmount() is waiting for the inode_map to be cleared, if the delay_i_release is empty the _unmount() will be woke up too frequent that the dump_cache() won't get any chance to be called. Fixes: https://tracker.ceph.com/issues/48707 Signed-off-by: Xiubo Li --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 3d3c3db0b7ae..0077d391a7f6 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3155,6 +3155,9 @@ void Client::delay_put_inodes(bool wakeup) release.swap(delay_i_release); } + if (release.empty()) + return; + for (auto &[in, cnt] : release) _put_inode(in, cnt);