* [PATCH] ceph: break the check delayed cap loop every 5s
@ 2024-01-17 4:47 xiubli
0 siblings, 0 replies; only message in thread
From: xiubli @ 2024-01-17 4:47 UTC (permalink / raw
To: ceph-devel; +Cc: idryomov, jlayton, vshankar, mchangir, Xiubo Li
From: Xiubo Li <xiubli@redhat.com>
In some cases this may take a long time and will block renewing
the caps to MDS.
URL: https://tracker.ceph.com/issues/50223#note-21
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
fs/ceph/caps.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index ba94ad6d45fe..5501c86b337d 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -4647,6 +4647,14 @@ unsigned long ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
iput(inode);
spin_lock(&mdsc->cap_delay_lock);
}
+
+ /*
+ * Just in case too many dirty caps or slow
+ * performance case won't block the delayed
+ * work to renew the caps.
+ */
+ if (jiffies - loop_start >= 5 * HZ)
+ break;
}
spin_unlock(&mdsc->cap_delay_lock);
doutc(cl, "done\n");
--
2.39.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-17 4:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 4:47 [PATCH] ceph: break the check delayed cap loop every 5s xiubli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).