提交 eb55bbf8 编写于 作者: X Xiangning Yu 提交者: David S. Miller

bonding: re-evaluate force_primary when the primary slave name changes

There is a timing issue under active-standy mode, when bond_enslave() is
called, bond->params.primary might not be initialized yet.

Any time the primary slave string changes, bond->force_primary should be
set to true to make sure the primary becomes the active slave.
Signed-off-by: NXiangning Yu <yuxiangning@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 000ade80
......@@ -1142,6 +1142,7 @@ static int bond_option_primary_set(struct bonding *bond,
slave->dev->name);
rcu_assign_pointer(bond->primary_slave, slave);
strcpy(bond->params.primary, slave->dev->name);
bond->force_primary = true;
bond_select_active_slave(bond);
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册