ceph: set timeout conditionally in __cap_delay_requeue
authorXuehan Xu <xxhdx1985126@gmail.com>
Thu, 11 Oct 2018 09:55:39 +0000 (17:55 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 22 Oct 2018 08:28:21 +0000 (10:28 +0200)
commit668028844174aa7069da1f8ea89a5dbc93e86216
treebcae7d1adac13c98ae2aacf495d46f37d699c30b
parent894868330a1e038ea4a65dbb81741eef70ad71b1
ceph: set timeout conditionally in __cap_delay_requeue

__cap_delay_requeue could be invoked through ceph_check_caps when there
exists caps that needs to be sent and are delayed by "i_hold_caps_min"
or "i_hold_caps_max". If __cap_delay_requeue sets timeout unconditionally,
there could be a chance that some "wanted" caps can not be release for a
long since their timeouts are reset every time they get delayed.

Fixes: http://tracker.ceph.com/issues/36369
Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c