Skip to content

Commit 70cf2fe

Browse files
Alexander Aringteigland
authored andcommitted
fs: dlm: warn about messages from left nodes
This patch warns about messages which are received from nodes who already left the lockspace resource signaled by the cluster manager. Before commit 489d8e5 ("fs: dlm: add reliable connection if reconnect") there was a synchronization issue with the socket lifetime and the cluster event of leaving a lockspace and other nodes did not stop of sending messages because the cluster manager has a pending message to leave the lockspace. The reliable session layer for dlm use sequence numbers to ensure dlm message were never being dropped. If this is not corrected synchronized we have a problem, this patch will use the filter case and turn it into a WARN_ON_ONCE() so we seeing such issue on the kernel log because it should never happen now. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 5ce9ef3 commit 70cf2fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/dlm/lock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4616,7 +4616,7 @@ static void _receive_message(struct dlm_ls *ls, struct dlm_message *ms,
46164616
{
46174617
int error = 0, noent = 0;
46184618

4619-
if (!dlm_is_member(ls, le32_to_cpu(ms->m_header.h_nodeid))) {
4619+
if (WARN_ON_ONCE(!dlm_is_member(ls, le32_to_cpu(ms->m_header.h_nodeid)))) {
46204620
log_limit(ls, "receive %d from non-member %d %x %x %d",
46214621
le32_to_cpu(ms->m_type),
46224622
le32_to_cpu(ms->m_header.h_nodeid),
@@ -4754,7 +4754,7 @@ static void dlm_receive_message(struct dlm_ls *ls, struct dlm_message *ms,
47544754
/* If we were a member of this lockspace, left, and rejoined,
47554755
other nodes may still be sending us messages from the
47564756
lockspace generation before we left. */
4757-
if (!ls->ls_generation) {
4757+
if (WARN_ON_ONCE(!ls->ls_generation)) {
47584758
log_limit(ls, "receive %d from %d ignore old gen",
47594759
le32_to_cpu(ms->m_type), nodeid);
47604760
return;

0 commit comments

Comments
 (0)