aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2023-01-12 17:18:45 -0500
committerDavid Teigland <teigland@redhat.com>2023-01-23 16:13:20 -0600
commit317dd6ba6ccaa5e7c24039955c39df84072d5166 (patch)
tree8c1f21df9c38c5f82fd18a20bd46db64b88f70b4 /fs/dlm
parentb8b750e0c99f39223115f2672ac4cfa96ecb9edd (diff)
downloadlinux-317dd6ba6ccaa5e7c24039955c39df84072d5166.tar.gz
fs: dlm: make dlm sequence id more robust
When joining a new lockspace, use a random number to initialize a sequence number used in messages. This makes it easier to detect sequence number mismatches in message replies during tests that repeatedly join and leave a lockspace. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-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 d9dc0b734002e..9f344d76afa3a 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -572,7 +572,7 @@ static int new_lockspace(const char *name, const char *cluster,
spin_lock_init(&ls->ls_rcom_spin);
get_random_bytes(&ls->ls_rcom_seq, sizeof(uint64_t));
ls->ls_recover_status = 0;
- ls->ls_recover_seq = 0;
+ ls->ls_recover_seq = get_random_u64();
ls->ls_recover_args = NULL;
init_rwsem(&ls->ls_in_recovery);
init_rwsem(&ls->ls_recv_active);