ceph: optimizing cap reservation
authorChengguang Xu <cgxu519@icloud.com>
Sat, 24 Feb 2018 10:36:02 +0000 (18:36 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 08:12:47 +0000 (10:12 +0200)
commit79cd674aed7363a043222af3c8f97d0ea0a078cf
tree86fe0a19a23723b1b8ef0b0d81ebe18b04c8d4d1
parentb517c1d87faafba0c33a38ffdd551e8b399f0a31
ceph: optimizing cap reservation

When caps_avail_count is in a low level, most newly
trimmed caps will probably go into ->caps_list and
caps_avail_count will be increased. Hence after trimming,
should recheck caps_avail_count to effectly reuse
newly trimmed caps. Also, when releasing unnecessary
caps follow the same rule of ceph_put_cap.

Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c