Commit bba1560b authored by Xiubo Li's avatar Xiubo Li Committed by Ilya Dryomov
Browse files

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: default avatarXiubo Li <xiubli@redhat.com>
Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 3a3430af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}