Message ID | 20240117044735.701196-1-xiubli@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: break the check delayed cap loop every 5s | expand |
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");