From: Xiubo Li Date: Tue, 26 Nov 2019 12:32:22 +0000 (-0500) Subject: ceph: trigger the reclaim work once there has enough pending caps X-Git-Tag: v5.10.7~3656^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bba1560bd4a46aa0d16bb7d81abd9d0eb47dea36;p=platform%2Fkernel%2Flinux-rpi.git ceph: trigger the reclaim work once there has enough pending caps The nr in ceph_reclaim_caps_nr() is very possibly larger than 1, so we may miss it and the reclaim work couldn't triggered as expected. Signed-off-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index f8735fc..374db1b 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2015,7 +2015,7 @@ void ceph_reclaim_caps_nr(struct ceph_mds_client *mdsc, int nr) if (!nr) return; val = atomic_add_return(nr, &mdsc->cap_reclaim_pending); - if (!(val % CEPH_CAPS_PER_RELEASE)) { + if ((val % CEPH_CAPS_PER_RELEASE) < nr) { atomic_set(&mdsc->cap_reclaim_pending, 0); ceph_queue_cap_reclaim_work(mdsc); }