Commit 256f5b24 authored by Guoqing Jiang's avatar Guoqing Jiang Committed by Goldwyn Rodrigues

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: default avatarGuoqing Jiang <gqjiang@suse.com>
Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
parent 487cf914
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment