]> 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>
Mon, 13 Dec 2021 08:49:50 +0000 (16:49 +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>
src/client/Client.cc
src/client/Inode.cc

index 4e5e4164c3553aff4b7f8af25da7b6cb4129d8bc..dd18cb51d48bda7b317c1b1fdf1f536d2042386c 100644 (file)
@@ -3835,6 +3835,7 @@ void Client::check_caps(Inode *in, unsigned flags)
       flush_tid = 0;
     }
 
+    in->delay_cap_item.remove_myself();
     send_cap(in, session.get(), &cap, msg_flags, cap_used, wanted, retain,
             flushing, flush_tid);
   }
index 1418a1fc8e3d40ac0f6e3164d094f8f239e77012..0b3200bb0fa0778a527a158560f00c1cea98c17c 100644 (file)
@@ -783,6 +783,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);
 }
 
 /**