From: Alexander Aring <aahringo@redhat.com>
To: teigland@redhat.com
Cc: cluster-devel@redhat.com
Subject: [Cluster-devel] [PATCHv2 dlm-next 13/13] fs: dlm: don't use RCOM_NAMES for version detection
Date: Tue, 1 Aug 2023 14:09:50 -0400 [thread overview]
Message-ID: <20230801180950.3693180-14-aahringo@redhat.com> (raw)
In-Reply-To: <20230801180950.3693180-1-aahringo@redhat.com>
Currently RCOM_STATUS and RCOM_NAMES inclusive their replies are being
used to determine the DLM version. The RCOM_NAMES messages are triggered
in DLM recovery when calling dlm_recover_directory() only. At this time
the DLM version need to be determined. I ran some tests and did not
expirenced some issues. When the DLM version detection was developed
probably I run once in a case of RCOM_NAMES and the version was not
detected yet. However it seems to be not necessary.
For backwards compatibility we still need to accept RCOM_NAMES messages
which are not protected regarding the DLM message reliability layer aka
stateless message. This patch changes that RCOM_NAMES we are sending out
after this patch are not stateless anymore.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/rcom.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index 6ab029149a1d..3b734aed26b5 100644
--- a/fs/dlm/rcom.c
+++ b/fs/dlm/rcom.c
@@ -308,15 +308,15 @@ static void receive_sync_reply(struct dlm_ls *ls, const struct dlm_rcom *rc_in)
int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name,
int last_len, uint64_t seq)
{
+ struct dlm_mhandle *mh;
struct dlm_rcom *rc;
- struct dlm_msg *msg;
int error = 0;
ls->ls_recover_nodeid = nodeid;
retry:
- error = create_rcom_stateless(ls, nodeid, DLM_RCOM_NAMES, last_len,
- &rc, &msg, seq);
+ error = create_rcom(ls, nodeid, DLM_RCOM_NAMES, last_len,
+ &rc, &mh, seq);
if (error)
goto out;
memcpy(rc->rc_buf, last_name, last_len);
@@ -324,7 +324,7 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name,
allow_sync_reply(ls, &rc->rc_id);
memset(ls->ls_recover_buf, 0, DLM_MAX_SOCKET_BUFSIZE);
- send_rcom_stateless(msg, rc);
+ send_rcom(mh, rc);
error = dlm_wait_function(ls, &rcom_response);
disallow_sync_reply(ls);
@@ -337,17 +337,17 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name,
static void receive_rcom_names(struct dlm_ls *ls, const struct dlm_rcom *rc_in,
uint64_t seq)
{
+ struct dlm_mhandle *mh;
struct dlm_rcom *rc;
int error, inlen, outlen, nodeid;
- struct dlm_msg *msg;
nodeid = le32_to_cpu(rc_in->rc_header.h_nodeid);
inlen = le16_to_cpu(rc_in->rc_header.h_length) -
sizeof(struct dlm_rcom);
outlen = DLM_MAX_APP_BUFSIZE - sizeof(struct dlm_rcom);
- error = create_rcom_stateless(ls, nodeid, DLM_RCOM_NAMES_REPLY, outlen,
- &rc, &msg, seq);
+ error = create_rcom(ls, nodeid, DLM_RCOM_NAMES_REPLY, outlen,
+ &rc, &mh, seq);
if (error)
return;
rc->rc_id = rc_in->rc_id;
@@ -355,7 +355,7 @@ static void receive_rcom_names(struct dlm_ls *ls, const struct dlm_rcom *rc_in,
dlm_copy_master_names(ls, rc_in->rc_buf, inlen, rc->rc_buf, outlen,
nodeid);
- send_rcom_stateless(msg, rc);
+ send_rcom(mh, rc);
}
int dlm_send_rcom_lookup(struct dlm_rsb *r, int dir_nodeid, uint64_t seq)
--
2.31.1
prev parent reply other threads:[~2023-08-01 18:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 18:09 [Cluster-devel] [PATCHv2 dlm-next 00/13] fs: dlm: miscs and msgs processing changes Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 01/13] fs: dlm: add missing spin_unlock Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 02/13] fs: dlm: remove unused processed_nodes Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 03/13] fs: dlm: debugfs for queued callbacks Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 04/13] fs: dlm: check on plock ops when exit dlm Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 05/13] fs: dlm: add plock dev tracepoints Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 06/13] fs: dlm: remove clear_members_cb Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 07/13] fs: dlm: cleanup lock order Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 08/13] fs: dlm: get recovery sequence number as parameter Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 09/13] fs: dlm: drop rxbuf manipulation in dlm_copy_master_names Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 10/13] fs: dlm: drop rxbuf manipulation in dlm_recover_master_copy Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 11/13] fs: dlm: constify receive buffer Alexander Aring
2023-08-01 18:09 ` [Cluster-devel] [PATCHv2 dlm-next 12/13] fs: dlm: create midcomms nodes when configure Alexander Aring
2023-08-01 18:09 ` Alexander Aring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230801180950.3693180-14-aahringo@redhat.com \
--to=aahringo@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=teigland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).