netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: Milos Vyletel <milos.vyletel@sde.cz>
Cc: netdev@vger.kernel.org, andy@greyhouse.net
Subject: Re: [PATCH] bonding: unset primary slave via sysfs
Date: Tue, 29 Jan 2013 10:35:40 -0800	[thread overview]
Message-ID: <31224.1359484540@death.nxdomain> (raw)
In-Reply-To: <1359393652-2804-1-git-send-email-milos.vyletel@sde.cz>

Milos Vyletel <milos.vyletel@sde.cz> wrote:

>When bonding module is loaded with primary parameter and one decides to unset
>primary slave using sysfs these settings are not preserved during bond device
>restart. Primary slave is only unset once and it's not remembered in
>bond->params structure.
>
>Signed-off-by: Milos Vyletel <milos.vyletel@sde.cz>

	I think the patch is fine, although I did prefer the longer
commit message from the initial version (the one that explained how to
reproduce the problem).

	-J

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>


>---
> drivers/net/bonding/bond_sysfs.c |    1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
>index ef8d2a0..155f3b4 100644
>--- a/drivers/net/bonding/bond_sysfs.c
>+++ b/drivers/net/bonding/bond_sysfs.c
>@@ -1067,6 +1067,7 @@ static ssize_t bonding_store_primary(struct device *d,
> 		pr_info("%s: Setting primary slave to None.\n",
> 			bond->dev->name);
> 		bond->primary_slave = NULL;
>+		memset(bond->params.primary, 0, sizeof(bond->params.primary));
> 		bond_select_active_slave(bond);
> 		goto out;
> 	}
>-- 
>1.7.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  parent reply	other threads:[~2013-01-29 18:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28 17:20 [PATCH] bonding: unset primary slave via sysfs Milos Vyletel
2013-01-29 11:54 ` Jiri Pirko
2013-01-29 18:35 ` Jay Vosburgh [this message]
2013-01-29 19:20   ` Milos Vyletel
2013-01-29 19:27     ` Jay Vosburgh
2013-01-29 19:59 ` [PATCH v2] " Milos Vyletel
2013-01-29 20:47   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-01-25 18:41 [PATCH] " Milos Vyletel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31224.1359484540@death.nxdomain \
    --to=fubar@us.ibm.com \
    --cc=andy@greyhouse.net \
    --cc=milos.vyletel@sde.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).