ceph: add global total_caps to count the mdsc's total caps number
This will help to reduce using the global mdsc->mutex lock in many places. Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:

zatwierdzone przez
Ilya Dryomov

rodzic
3e699bd865
commit
4f1d756def
@@ -22,6 +22,7 @@ int ceph_metric_init(struct ceph_client_metric *m)
|
||||
if (ret)
|
||||
goto err_d_lease_mis;
|
||||
|
||||
atomic64_set(&m->total_caps, 0);
|
||||
ret = percpu_counter_init(&m->i_caps_hit, 0, GFP_KERNEL);
|
||||
if (ret)
|
||||
goto err_i_caps_hit;
|
||||
|
Reference in New Issue
Block a user