Mark Wu has posted comments on this change.

Change subject: configNetwork: fix bonding mode issue
......................................................................


Patch Set 1:

Good point! Actually, that's also my question when I fix this problem. I am a 
little bit ashamed that I didn't look into it at time. 

It turns out that it caused by a recent kernel change as you guessed. So that 
means this problem could only happen on fedora host, which explains that it's 
not reported before.

For details, please see the following kernel commit:

git show 4a8bb7e2
commit 4a8bb7e27fbb68da888b55f26defd2855225b2d5
Author: Veaceslav Falico <[email protected]>
Date:   Tue Nov 15 06:44:42 2011 +0000

    bonding: Don't allow mode change via sysfs with slaves present
    
    When changing mode via bonding's sysfs, the slaves are not initialized
    correctly. Forbid to change modes with slaves present to ensure that every
    slave is initialized correctly via bond_enslave().
    
    Signed-off-by: Veaceslav Falico <[email protected]>
    Signed-off-by: Andy Gospodarek <[email protected]>
    Acked-by: Nicolas de Pesloüan <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 5a20804..4ef7e2f 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -319,6 +319,13 @@ static ssize_t bonding_store_mode(struct device *d,
                goto out;
        }
 
+       if (bond->slave_cnt > 0) {
+               pr_err("unable to update mode of %s because it has slaves.\n",
+                       bond->dev->name);
+               ret = -EPERM;
+               goto out;
+       }
+
        new_value = bond_parse_parm(buf, bond_mode_tbl);
        if (new_value < 0)  {
                pr_err("%s: Ignoring invalid mode value %.*s.\n",
[mark@localhost net]$ git name-rev --tag 
4a8bb7e27fbb68da888b55f26defd2855225b2d5
4a8bb7e27fbb68da888b55f26defd2855225b2d5 tags/v3.2-rc3~25^2~4

--
To view, visit http://gerrit.ovirt.org/6217
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9855ef2d0e05603f07397eb26822fac5fc8eaf5b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to