diff options
author | Alexander Aring <aahringo@redhat.com> | 2023-08-01 20:09:45 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2023-08-10 17:33:03 +0200 |
commit | c4f4e135c27b503d325d414819831909023b113d (patch) | |
tree | c8058943ff789979369e139c56c84ce7534b4b75 /fs/dlm/lock.c | |
parent | fs: dlm: cleanup lock order (diff) | |
download | linux-c4f4e135c27b503d325d414819831909023b113d.tar.xz linux-c4f4e135c27b503d325d414819831909023b113d.zip |
fs: dlm: get recovery sequence number as parameter
This patch removes a read of the ls->ls_recover_seq uint64_t number in
_create_rcom(). If the ls->ls_recover_seq is readed the ls_recover_lock
need to held. However this number was always readed before when any rcom
message is received and it's not necessary to read it again from a per
lockspace variable to use it for the replying message. This patch will
pass the sequence number as parameter so another read of ls->ls_recover_seq
and holding the ls->ls_recover_lock is not required.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r-- | fs/dlm/lock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index f511a9d7d416..b489da38e685 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -5464,7 +5464,8 @@ int dlm_recover_master_copy(struct dlm_ls *ls, struct dlm_rcom *rc) } /* needs at least dlm_rcom + rcom_lock */ -int dlm_recover_process_copy(struct dlm_ls *ls, struct dlm_rcom *rc) +int dlm_recover_process_copy(struct dlm_ls *ls, struct dlm_rcom *rc, + uint64_t seq) { struct rcom_lock *rl = (struct rcom_lock *) rc->rc_buf; struct dlm_rsb *r; @@ -5509,7 +5510,7 @@ int dlm_recover_process_copy(struct dlm_ls *ls, struct dlm_rcom *rc) lkid, le32_to_cpu(rc->rc_header.h_nodeid), remid, result); - dlm_send_rcom_lock(r, lkb); + dlm_send_rcom_lock(r, lkb, seq); goto out; case -EEXIST: case 0: |