summaryrefslogtreecommitdiffstats
path: root/fs/dlm/lockspace.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-04-15 20:39:42 +0200
committerDavid Teigland <teigland@redhat.com>2024-04-16 21:45:31 +0200
commite91313591b29ce724fe2f1bdf29f2482878fc275 (patch)
treef3058f289d907f09b98a946527b388e6e6f57a93 /fs/dlm/lockspace.c
parentdlm: drop dlm_scand kthread and use timers (diff)
downloadlinux-e91313591b29ce724fe2f1bdf29f2482878fc275.tar.xz
linux-e91313591b29ce724fe2f1bdf29f2482878fc275.zip
dlm: use rwlock for rsb hash table
The conversion to rhashtable introduced a hash table lock per lockspace, in place of per bucket locks. To make this more scalable, switch to using a rwlock for hash table access. The common case fast path uses it as a read lock. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lockspace.c')
-rw-r--r--fs/dlm/lockspace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 931eb3f22ec6..04f4c74831ce 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -424,7 +424,7 @@ static int new_lockspace(const char *name, const char *cluster,
INIT_LIST_HEAD(&ls->ls_toss);
INIT_LIST_HEAD(&ls->ls_keep);
- spin_lock_init(&ls->ls_rsbtbl_lock);
+ rwlock_init(&ls->ls_rsbtbl_lock);
error = rhashtable_init(&ls->ls_rsbtbl, &dlm_rhash_rsb_params);
if (error)