[netns] sysfs: issues porting shadow directories on top of 2.6.21-mm2

Eric W. Biederman ebiederm at xmission.com
Thu Jun 21 14:02:38 PDT 2007


Dave Hansen <hansendc at us.ibm.com> writes:

> On Mon, 2007-06-18 at 19:57 +0200, Benjamin Thery wrote:
>> /sys/class/net/          ("real" net class)
>> /sys/class/net-shadow1/
>> /sys/class/net-shadow2/
>
> This seems like a nice "quick fix", but do we really want to be hacking
> sysfs around like this?
>
> We have the backing sysfs_* entries that are separate from the vfs
> entities already.  Why can't we simply have different /sys vfsmounts
> with different views of the backing sysfs_* entries?

Dave.  Another and probably better way of looking at this is we need
essentially the same code in sysfs however we implement it.  The only
practical difference is do we get the namespaces from the mount of
sysfs or from the current process doing the reading.

If you would like to take this in the direction of looking at the
mount point for the information and seeing if there are optimizations
we can apply with static information free.

Wherever we end up I think this code is a fairly decent starting place.

Eric


More information about the Containers mailing list