]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: skip putting inodes if map is empty
authorXiubo Li <xiubli@redhat.com>
Wed, 23 Dec 2020 08:01:39 +0000 (16:01 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 23 Dec 2020 08:23:43 +0000 (16:23 +0800)
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 <xiubli@redhat.com>
src/client/Client.cc

index 3d3c3db0b7ae9e008462c626ef3d73b9bad331bd..0077d391a7f615171531da624c02395fc4a93a9f 100644 (file)
@@ -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);