From f3cd0695ff2b2fe35c2d67b8774d9f5aec6b9d98 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Tue, 8 Jan 2008 16:24:00 -0600 Subject: [PATCH] --- yaml --- r: 80612 b: refs/heads/master c: 46b43eed7018bab3a4e8c259eed27697b9170cb8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/dlm/lock.c | 9 ++++++++- trunk/fs/dlm/member.c | 4 ++-- trunk/fs/dlm/member.h | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d25ee51d18ca..4dcee8869a6b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aec64e1be2225c6fc64499594d23257c6adf6168 +refs/heads/master: 46b43eed7018bab3a4e8c259eed27697b9170cb8 diff --git a/trunk/fs/dlm/lock.c b/trunk/fs/dlm/lock.c index d5e8ea1b4f75..c3b9fca17044 100644 --- a/trunk/fs/dlm/lock.c +++ b/trunk/fs/dlm/lock.c @@ -1,7 +1,7 @@ /****************************************************************************** ******************************************************************************* ** -** Copyright (C) 2005-2007 Red Hat, Inc. All rights reserved. +** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions @@ -3643,6 +3643,13 @@ static void receive_lookup_reply(struct dlm_ls *ls, struct dlm_message *ms) static void _receive_message(struct dlm_ls *ls, struct dlm_message *ms) { + if (!dlm_is_member(ls, ms->m_header.h_nodeid)) { + log_debug(ls, "ignore non-member message %d from %d %x %x %d", + ms->m_type, ms->m_header.h_nodeid, ms->m_lkid, + ms->m_remid, ms->m_result); + return; + } + switch (ms->m_type) { /* messages sent to a master node */ diff --git a/trunk/fs/dlm/member.c b/trunk/fs/dlm/member.c index e9cdcab306e2..fa17f5a27883 100644 --- a/trunk/fs/dlm/member.c +++ b/trunk/fs/dlm/member.c @@ -1,7 +1,7 @@ /****************************************************************************** ******************************************************************************* ** -** Copyright (C) 2005-2007 Red Hat, Inc. All rights reserved. +** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions @@ -70,7 +70,7 @@ static void dlm_remove_member(struct dlm_ls *ls, struct dlm_member *memb) ls->ls_num_nodes--; } -static int dlm_is_member(struct dlm_ls *ls, int nodeid) +int dlm_is_member(struct dlm_ls *ls, int nodeid) { struct dlm_member *memb; diff --git a/trunk/fs/dlm/member.h b/trunk/fs/dlm/member.h index 927c08c19214..7a26fca1e0b5 100644 --- a/trunk/fs/dlm/member.h +++ b/trunk/fs/dlm/member.h @@ -1,7 +1,7 @@ /****************************************************************************** ******************************************************************************* ** -** Copyright (C) 2005 Red Hat, Inc. All rights reserved. +** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions @@ -19,6 +19,7 @@ void dlm_clear_members(struct dlm_ls *ls); void dlm_clear_members_gone(struct dlm_ls *ls); int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv,int *neg_out); int dlm_is_removed(struct dlm_ls *ls, int nodeid); +int dlm_is_member(struct dlm_ls *ls, int nodeid); #endif /* __MEMBER_DOT_H__ */