]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: always queue the dirty Inode in delayed_list
authorXiubo Li <xiubli@redhat.com>
Mon, 13 Dec 2021 04:50:40 +0000 (12:50 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 1 Nov 2023 01:21:06 +0000 (09:21 +0800)
If the check_caps() won't be trigger for some Inode, the dirty caps
could be kept in the client side for a long time, in some cases it
could make the client hold a lot of caps, which could exceed the
mds's limitation.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit d4c175cd5e0f97ca75ee9e62592ac41e3da9c805)

 Conflicts:
src/client/Client.cc

src/client/Client.cc
src/client/Inode.cc

index 1944e6081a03e787e4708675f7abc4c9205c55f0..d5993d84159db7385783033d8033518338332ceb 100644 (file)
@@ -3980,6 +3980,7 @@ void Client::check_caps(Inode *in, unsigned flags)
       flush_tid = 0;
     }
 
+    in->delay_cap_item.remove_myself();
     send_cap(in, session, &cap, msg_flags, cap_used, wanted, retain,
             flushing, flush_tid);
   }
index da68c24c4393d3e9a993a3b84d41211c20b853b1..2260811f482e5b56347eac68a27981e0d9664fb6 100644 (file)
@@ -778,6 +778,7 @@ void Inode::mark_caps_dirty(int caps)
     iget();
   dirty_caps |= caps;
   client->get_dirty_list().push_back(&dirty_cap_item);
+  client->cap_delay_requeue(this);
 }
 
 /**