From: Greg KH <greg@kroah.com>
To: Mitch Williams <mitch.a.williams@intel.com>
Cc: Radheka Godse <radheka.godse@intel.com>, netdev@oss.sgi.com
Subject: Re: [PATCH 2.6.13-rc1 8/17] bonding: SYSFS INTERFACE (large)
Date: Wed, 6 Jul 2005 12:52:32 -0700 [thread overview]
Message-ID: <20050706195232.GB18359@kroah.com> (raw)
In-Reply-To: <Pine.CYG.4.58.0507061138030.1208@mawilli1-desk2.amr.corp.intel.com>
On Wed, Jul 06, 2005 at 11:53:13AM -0700, Mitch Williams wrote:
>
>
> On Sat, 2 Jul 2005, Greg KH wrote:
>
> >
> > This violates the 1-value-per-sysfs file rule. Please fix this up.
> >
>
> Thanks for looking at our patch, Greg. We're aware of the "one value"
> rule, but we really couldn't find any way to do what we wanted to do
> any other way. The kernel docs do indicate that it is "socially
> acceptable to express an array of values of values of the same type",
> which this certainly is.
>
> In this particular case, the file /sys/class/net/bonding_masters contains
> the names of all of the bonds in the system. By default, the module
> creates a single bond when it loads, thus:
>
> $ cat bonding_masters
> bond0
And, if you have a _lot_ of bonds, you will not show them all, right?
That would not work well if you read the file, and then append a new one
and write it back.
> You can add and remove bonds just by writing to the file. In keeping with
> the "array of types" concept, you must write the names of all active bonds
> back to the file. Thus,
>
> $ echo "bond0 bond1" > bonding_masters
>
> retains bond0 and adds bond1. Likewise,
>
> $ echo "bond1 bond2" > bonding_masters
>
> retains bond1, deletes bond0, and adds bond2.
>
> The slaves file in each bond's directory acts the same way, and is used to
> add or remove slaves from each individual bond.
>
> We discussed this design extensively before implementation, but really
> couldn't come up with anything as elegant or easy to understand as this
> scheme. Since it really is an array of similar values, we are hoping that
> it will be viewed as socially acceptable.
No.
How about this:
bond_add - write to this to add a new bond, one value only.
bond_remove - write to this to remove a bond that is present.
bonds/bond0
bonds/bond1
bonds/bond2
...
- list of bonds currently present. If you want, you
could make those bondX files directories, and put
other info about the individual bonds in there, if you
need it (I know nothing about the bonding intrerface,
sorry.)
Would that work?
thanks,
greg k-h
next prev parent reply other threads:[~2005-07-06 19:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-01 20:48 [PATCH 2.6.13-rc1 8/17] bonding: SYSFS INTERFACE (large) Radheka Godse
2005-07-02 5:30 ` Dmitry Torokhov
2005-07-06 18:37 ` Mitch Williams
2005-07-06 19:02 ` Stephen Hemminger
2005-07-06 19:09 ` Dmitry Torokhov
2005-07-07 23:32 ` Mitch Williams
2005-07-02 8:13 ` Greg KH
2005-07-06 18:53 ` Mitch Williams
2005-07-06 19:52 ` Greg KH [this message]
2005-07-07 14:25 ` John W. Linville
2005-07-07 23:06 ` Mitch Williams
2005-07-07 23:14 ` Greg KH
2005-07-08 21:14 ` Mitch Williams
2005-07-08 21:31 ` Greg KH
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=20050706195232.GB18359@kroah.com \
--to=greg@kroah.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@oss.sgi.com \
--cc=radheka.godse@intel.com \
/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).