From: Benjamin Thery <benjamin.thery@bull.net>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Tejun Heo <tj@kernel.org>, Greg KH <greg@kroah.com>,
Al Viro <viro@ZenIV.linux.org.uk>,
linux-kernel@vger.kernel.org, Al Viro <viro@ftp.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: sysfs: tagged directories not merged completely yet
Date: Wed, 15 Oct 2008 15:54:48 +0200 [thread overview]
Message-ID: <48F5F628.8080500@bull.net> (raw)
In-Reply-To: <20081015134204.GA26886@us.ibm.com>
Serge E. Hallyn wrote:
> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> "Serge E. Hallyn" <serue@us.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
next prev parent reply other threads:[~2008-10-15 13:55 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-22 14:31 sysfs: tagged directories not merged completely yet Benjamin Thery
2008-09-22 15:34 ` Greg KH
2008-09-22 20:24 ` Eric W. Biederman
2008-09-23 14:24 ` Benjamin Thery
2008-09-23 18:23 ` Eric W. Biederman
2008-10-03 10:13 ` Al Viro
2008-10-05 5:32 ` Greg KH
2008-10-07 8:27 ` Eric W. Biederman
2008-10-07 10:47 ` [PATCH 0/3] minor sysfs tagged directory fixes Eric W. Biederman
2008-10-07 10:49 ` [PATCH 1/3] sysfs: Remove lock ordering violation in sysfs_chmod_file Eric W. Biederman
2008-10-07 10:51 ` [PATCH 2/3] sysfs: Fix and sysfs_mv_dir by using lock_rename Eric W. Biederman
2008-10-07 10:52 ` [PATCH 3/3] sysfs: Take sysfs_mutex when fetching the root inode Eric W. Biederman
2008-10-07 21:21 ` [PATCH 2/3] sysfs: Fix and sysfs_mv_dir by using lock_rename Dave Hansen
2008-10-07 21:19 ` [PATCH 1/3] sysfs: Remove lock ordering violation in sysfs_chmod_file Dave Hansen
2008-10-07 22:31 ` Eric W. Biederman
2008-10-07 22:27 ` sysfs: tagged directories not merged completely yet Greg KH
2008-10-07 22:54 ` Serge E. Hallyn
2008-10-07 23:39 ` Greg KH
2008-10-08 0:12 ` Serge E. Hallyn
2008-10-08 0:38 ` Greg KH
2008-10-08 14:18 ` Serge E. Hallyn
2008-10-07 23:34 ` Tejun Heo
2008-10-14 1:11 ` Eric W. Biederman
2008-10-14 7:55 ` Tejun Heo
2008-10-14 12:19 ` Eric W. Biederman
2008-10-15 11:04 ` Tejun Heo
2008-10-16 21:58 ` Eric W. Biederman
2008-10-14 18:53 ` Serge E. Hallyn
2008-10-15 0:48 ` Eric W. Biederman
2008-10-15 13:42 ` Serge E. Hallyn
2008-10-15 13:54 ` Benjamin Thery [this message]
2008-10-08 0:39 ` Eric W. Biederman
2008-10-08 1:29 ` Eric W. Biederman
2008-10-07 8:08 ` Eric W. Biederman
2008-10-07 9:01 ` Daniel Lezcano
2008-10-07 9:12 ` Tejun Heo
2008-10-07 11:56 ` Eric W. Biederman
2008-10-07 12:19 ` Tejun Heo
2008-10-07 23:17 ` Tejun Heo
2008-10-08 0:04 ` Eric W. Biederman
2008-10-08 0:20 ` Tejun Heo
2008-10-08 0:58 ` Eric W. Biederman
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=48F5F628.8080500@bull.net \
--to=benjamin.thery@bull.net \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
--cc=viro@ftp.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.