Skip to content

Commit a3d85fc

Browse files
Alexander Aringteigland
authored andcommitted
fs: dlm: don't use RCOM_NAMES for version detection
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> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 63e711b commit a3d85fc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

fs/dlm/rcom.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -308,23 +308,23 @@ static void receive_sync_reply(struct dlm_ls *ls, const struct dlm_rcom *rc_in)
308308
int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name,
309309
int last_len, uint64_t seq)
310310
{
311+
struct dlm_mhandle *mh;
311312
struct dlm_rcom *rc;
312-
struct dlm_msg *msg;
313313
int error = 0;
314314

315315
ls->ls_recover_nodeid = nodeid;
316316

317317
retry:
318-
error = create_rcom_stateless(ls, nodeid, DLM_RCOM_NAMES, last_len,
319-
&rc, &msg, seq);
318+
error = create_rcom(ls, nodeid, DLM_RCOM_NAMES, last_len,
319+
&rc, &mh, seq);
320320
if (error)
321321
goto out;
322322
memcpy(rc->rc_buf, last_name, last_len);
323323

324324
allow_sync_reply(ls, &rc->rc_id);
325325
memset(ls->ls_recover_buf, 0, DLM_MAX_SOCKET_BUFSIZE);
326326

327-
send_rcom_stateless(msg, rc);
327+
send_rcom(mh, rc);
328328

329329
error = dlm_wait_function(ls, &rcom_response);
330330
disallow_sync_reply(ls);
@@ -337,25 +337,25 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name,
337337
static void receive_rcom_names(struct dlm_ls *ls, const struct dlm_rcom *rc_in,
338338
uint64_t seq)
339339
{
340+
struct dlm_mhandle *mh;
340341
struct dlm_rcom *rc;
341342
int error, inlen, outlen, nodeid;
342-
struct dlm_msg *msg;
343343

344344
nodeid = le32_to_cpu(rc_in->rc_header.h_nodeid);
345345
inlen = le16_to_cpu(rc_in->rc_header.h_length) -
346346
sizeof(struct dlm_rcom);
347347
outlen = DLM_MAX_APP_BUFSIZE - sizeof(struct dlm_rcom);
348348

349-
error = create_rcom_stateless(ls, nodeid, DLM_RCOM_NAMES_REPLY, outlen,
350-
&rc, &msg, seq);
349+
error = create_rcom(ls, nodeid, DLM_RCOM_NAMES_REPLY, outlen,
350+
&rc, &mh, seq);
351351
if (error)
352352
return;
353353
rc->rc_id = rc_in->rc_id;
354354
rc->rc_seq_reply = rc_in->rc_seq;
355355

356356
dlm_copy_master_names(ls, rc_in->rc_buf, inlen, rc->rc_buf, outlen,
357357
nodeid);
358-
send_rcom_stateless(msg, rc);
358+
send_rcom(mh, rc);
359359
}
360360

361361
int dlm_send_rcom_lookup(struct dlm_rsb *r, int dir_nodeid, uint64_t seq)

0 commit comments

Comments
 (0)