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>
This commit is contained in:
parent
b8b750e0c9
commit
317dd6ba6c
|
@ -572,7 +572,7 @@ static int new_lockspace(const char *name, const char *cluster,
|
||||||
spin_lock_init(&ls->ls_rcom_spin);
|
spin_lock_init(&ls->ls_rcom_spin);
|
||||||
get_random_bytes(&ls->ls_rcom_seq, sizeof(uint64_t));
|
get_random_bytes(&ls->ls_rcom_seq, sizeof(uint64_t));
|
||||||
ls->ls_recover_status = 0;
|
ls->ls_recover_status = 0;
|
||||||
ls->ls_recover_seq = 0;
|
ls->ls_recover_seq = get_random_u64();
|
||||||
ls->ls_recover_args = NULL;
|
ls->ls_recover_args = NULL;
|
||||||
init_rwsem(&ls->ls_in_recovery);
|
init_rwsem(&ls->ls_in_recovery);
|
||||||
init_rwsem(&ls->ls_recv_active);
|
init_rwsem(&ls->ls_recv_active);
|
||||||
|
|
Loading…
Reference in New Issue