Whamcloud - gitweb
LU-8130 ldlm: add a counter to the per-namespace data 19/36219/5
authorNeilBrown <neilb@suse.com>
Tue, 17 Sep 2019 19:34:39 +0000 (15:34 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 3 Jan 2020 00:09:09 +0000 (00:09 +0000)
commitf9314d6e9259e6c7683ed614931ab2506356ba88
tree40ca386dc236ab37d2687cef9b6e22507b1a9fdf
parent81fb8bc7d214394bbc504379a5a84441e871b60a
LU-8130 ldlm: add a counter to the per-namespace data

When we change the resource hash to rhashtable we won't have
a per-bucket counter.  We could use the nelems global counter,
but ldlm_resource goes to some trouble to avoid having any
table-wide atomics, and hopefully rhashtable will grow the
ability to disable the global counter in the near future.
Having a counter we control makes it easier to manage the
back-reference to the namespace when there is anything in the
hash table.

So add a counter to the ldlm_ns_bucket.

Change-Id: Ic79e96f95d5cacfb5e7bb02350f5f4fafb207b44
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/36219
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_resource.c