aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-11-02 15:17:18 -0400
committerDavid Teigland <teigland@redhat.com>2021-11-02 14:39:20 -0500
commit3cb5977c5214c219b2859f926ed547480d53fdde (patch)
treef321ca0c0e1f397073f194180f7e8043cea747aa /fs/dlm/dlm_internal.h
parent164d88abd7608e869b7617d5ff8893344fdda759 (diff)
downloadlinux-3cb5977c5214c219b2859f926ed547480d53fdde.tar.gz
fs: dlm: ls_count busy wait to event based wait
This patch changes the ls_count busy wait to use atomic counter values and wait_event() to wait until ls_count reach zero. It will slightly reduce the number of holding lslist_lock. At remove lockspace we need to retry the wait because it a lockspace get could interefere between wait_event() and holding the lock which deletes the lockspace list entry. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index fd1c7a8c44855..019931804af9b 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -548,8 +548,9 @@ struct dlm_ls {
uint32_t ls_generation;
uint32_t ls_exflags;
int ls_lvblen;
- int ls_count; /* refcount of processes in
+ atomic_t ls_count; /* refcount of processes in
the dlm using this ls */
+ wait_queue_head_t ls_count_wait;
int ls_create_count; /* create/release refcount */
unsigned long ls_flags; /* LSFL_ */
unsigned long ls_scan_time;