[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48F5F628.8080500@bull.net>
Date: Wed, 15 Oct 2008 15:54:48 +0200
From: Benjamin Thery <benjamin.thery@...l.net>
To: "Serge E. Hallyn" <serue@...ibm.com>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
Tejun Heo <tj@...nel.org>, Greg KH <greg@...ah.com>,
Al Viro <viro@...IV.linux.org.uk>,
linux-kernel@...r.kernel.org, Al Viro <viro@....linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: sysfs: tagged directories not merged completely yet
Serge E. Hallyn wrote:
> Quoting Eric W. Biederman (ebiederm@...ssion.com):
>> "Serge E. Hallyn" <serue@...ibm.com> writes:
>>
>>> Again fuse doesn't address the *core* issue (sysfs needing a way to
>>> create files for multiple devicenames with same name). But I believe
>>> Benjamin was looking into a minimal patch to fix that. Benjamin,
>>> have you gotten anywhere with that?
>> I would love to hear a minimal strategy for that.
>
> Oh I just meant for kernel-space. So if a container is creating lo,
> it will create a device named lo, but the sysfs file will be called
> lo_1 or something.
I've started working on a patch that implements what you suggested:
add a suffix representing the netns to net device entries in sysfs.
It does work, but there are some issues (in addition to the fact that
these new device entries doesn't look very clean in /sys/class/net :) ).
For example, what is a good suffix for the device name.
We only have 4 bytes left for the suffix:
BUS_ID_SIZE - IFNAMSIZ = 4
sysfs net device
name length name length
Benjamin
>
>> The only minimal strategy user space wise is to create multiple superblocks.
>> Anything else I an think of violates backwards compatibility.
>
> Yes, the above would require that the container either not mount
> sysfs, ignore sysfs, or tweak sysfs using
> mount -t tmpfs none /sys/class/net
> mount --bind /sys/devices/virtual/net/lo_1 /sys/class/net/lo
> or using fuse.
>
> I'd definately prefer the sysfs tagging approach. But I'd prefer
> the above over never being able to use network namespaces on a
> standard distro (with sysfs enabled).
>
> -serge
>
>
--
B e n j a m i n T h e r y - BULL/DT/Open Software R&D
http://www.bull.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists