ceph: break the check delayed cap loop every 5s
In some cases this may take a long time and will block renewing the caps to MDS. [ idryomov: massage comment ] Link: https://tracker.ceph.com/issues/50223#note-21 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
e8f897f4af
commit
09927e7ef1
@ -4634,6 +4634,14 @@ unsigned long ceph_check_delayed_caps(struct ceph_mds_client *mdsc)
|
||||
iput(inode);
|
||||
spin_lock(&mdsc->cap_delay_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure too many dirty caps or general
|
||||
* slowness doesn't block mdsc delayed work,
|
||||
* preventing send_renew_caps() from running.
|
||||
*/
|
||||
if (jiffies - loop_start >= 5 * HZ)
|
||||
break;
|
||||
}
|
||||
spin_unlock(&mdsc->cap_delay_lock);
|
||||
doutc(cl, "done\n");
|
||||
|
Loading…
Reference in New Issue
Block a user