• Or Gerlitz's avatar
    bonding: deliver netdev event for fail-over under the active-backup mode · 01f3109d
    Or Gerlitz authored
    under active-backup mode and when there's actual new_active slave,
    have bond_change_active_slave() call the networking core to deliver
    NETDEV_BONDING_FAILOVER event such that the fail-over can be notable
    by code outside of the bonding driver such as the RDMA stack and
    monitoring tools.
    
    As the correct context of locking appropriate for notifier calls is RTNL
    and nothing else, bond->curr_slave_lock and bond->lock are unlocked and
    later locked again. This is ensured by the rest of the code to be safe
    under backup-mode AND when new_active is not NULL.
    
    Jay Vosburgh modified the original patch for formatting and fixed a
    compiler error.
    Signed-off-by: default avatarOr Gerlitz <ogerlitz@voltaire.com>
    Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
    Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
    01f3109d
bond_main.c 134 KB