diff options
author | Alexander Aring <aahringo@redhat.com> | 2024-04-15 20:39:39 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2024-04-16 21:34:39 +0200 |
commit | 6c648035cbe75d78836f6d7d2fdd9d996048a66b (patch) | |
tree | e062c9951814bb7f3fcac71332d1ac54ff383e06 /fs/dlm/config.c | |
parent | dlm: add rsb lists for iteration (diff) | |
download | linux-6c648035cbe75d78836f6d7d2fdd9d996048a66b.tar.xz linux-6c648035cbe75d78836f6d7d2fdd9d996048a66b.zip |
dlm: switch to use rhashtable for rsbs
Replace our own hash table with the more advanced rhashtable
for keeping rsb structs.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r-- | fs/dlm/config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c index e55e0a2cd2e8..517fa975dc5a 100644 --- a/fs/dlm/config.c +++ b/fs/dlm/config.c @@ -63,6 +63,14 @@ static void release_node(struct config_item *); static struct configfs_attribute *comm_attrs[]; static struct configfs_attribute *node_attrs[]; +const struct rhashtable_params dlm_rhash_rsb_params = { + .nelem_hint = 3, /* start small */ + .key_len = DLM_RESNAME_MAXLEN, + .key_offset = offsetof(struct dlm_rsb, res_name), + .head_offset = offsetof(struct dlm_rsb, res_node), + .automatic_shrinking = true, +}; + struct dlm_cluster { struct config_group group; unsigned int cl_tcp_port; |