summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2015-10-12 17:21:23 +0800
committerGoldwyn Rodrigues <rgoldwyn@suse.com>2015-10-12 11:58:14 -0500
commit256f5b245aab93bfa2d8b86d66545fceea05408e (patch)
treed1c7001db40c4a6a4585b9a951542e38011d438d
parent487cf9142c434530443b7bb8c545e9d0f30391b1 (diff)
md-cluster: make sure the node do not receive it's own msg
During the past test, the node occasionally received the msg which is sent from itself, this case should not happen in theory, but it is better to avoid it in case something wrong happened. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
-rw-r--r--drivers/md/md-cluster.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c
index ba80df923605..8bddd7882292 100644
--- a/drivers/md/md-cluster.c
+++ b/drivers/md/md-cluster.c
@@ -462,6 +462,9 @@ static void process_readd_disk(struct mddev *mddev, struct cluster_msg *msg)
static void process_recvd_msg(struct mddev *mddev, struct cluster_msg *msg)
{
+ if (WARN(mddev->cluster_info->slot_number - 1 == le32_to_cpu(msg->slot),
+ "node %d received it's own msg\n", le32_to_cpu(msg->slot)))
+ return;
switch (msg->type) {
case METADATA_UPDATED:
process_metadata_update(mddev, msg);