From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Benjamin Thery <benjamin.thery@bull.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Eric Biederman <ebiederm@xmission.com>,
Serge Hallyn <serue@us.ibm.com>,
linux-kernel@vger.kernel.org, Tejun Heo <htejun@gmail.com>,
Al Viro <viro@ftp.linux.org.uk>,
Linux Containers <containers@lists.osdl.org>
Subject: Re: [PATCH 00/11] sysfs tagged directories V5
Date: Tue, 10 Jun 2008 17:50:24 -0500 [thread overview]
Message-ID: <20080610225024.GB22478@us.ibm.com> (raw)
In-Reply-To: <20080606154654.356185262@theryb.frec.bull.fr>
Quoting Benjamin Thery (benjamin.thery@bull.net):
> Greg,
>
> Here is an updated version of the sysfs tagged directories that improves
> a bit the situation over the previous one.
>
> I've modified the patch 09 ("Enable tagging for net_class directories in
> sysfs") to be a bit less intrusive in sysfs core. I removed the #ifdef'd
> parts you didn't like in fs/sysfs/mount.c, and replaced it by a generic
> routine sysfs_ns_exit() that is called, if needed, by the namespace when
> it exits. This routine goes through every sysfs super blocks and calls
> the callback passed by the namespace to clean its tag.
>
> The patch is now splitted in two:
> * 09/11: the generic routine,
> * 10/11: the remaining network parts.
>
> The generic part can be merge with patch 05 ("sysfs: Implement sysfs
> tagged directory support.") but I left it separate for now to ease
> reviews.
Thanks. Not nearly as radical as I'd feared.
Greg, does this address your concern? It stops the need to put any
non-braindead code (i.e. the _exit notifier stuff) in fs/sysfs/mount.c for
any new namespaces needing sysfs tagging, leaving only simple
comparison/assignments.
> Serge's patch for user namespace is modified to use this new service too.
> No more #ifdef CONFIG_NET or #ifdef CONFIG_USER_NS in fs/sysfs/mount.c
> now.
>
>
> But, currently, a new namespace that wants to add its tag to sysfs dirs
> still need to modify fs/sysfs/mount.c in a few routines to manage the
> new tag member added in struct sysfs_tag_info: sysfs_fill_super(),
> sysfs_test_super(), sysfs_kill_sb() (see the last two patches).
> These changes are only the initialization and a bunch of comparisons.
>
> If we really want to go further, to get rid of these, I've thought
> about:
>
> * Extending sysfs_tagged_dir_operations with super blocks operations:
> - fill_sb_tag, test_sb_tag, kill_sb_tag
>
> * Add routines in sysfs to allow registration/unregistration of these
> operations structs in a list:
> - sysfs_register_tagged_dir_ops()...
>
> * Each subsystem concerned implements and registers its operations at
> boot.
>
> * In sysfs_fill_super(), sysfs_test_super() and sysfs_kill_sb(), add
> loops to go through all registered operations structs and calls the
> corresponding operations if it's present.
>
> But... I thought it was a bit overkill for the few namespaces that will
> actually need sysfs tagged directories.
Agreed. We expect device namespaces... anything else?
thanks,
-serge
next prev parent reply other threads:[~2008-06-10 22:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 15:46 Benjamin Thery
2008-06-06 15:47 ` [PATCH 01/11] sysfs: Support for preventing unmounts Benjamin Thery
2008-06-06 15:47 ` [PATCH 02/11] sysfs: sysfs_get_dentry add a sb parameter Benjamin Thery
2008-06-06 15:47 ` [PATCH 03/11] sysfs: Implement __sysfs_get_dentry Benjamin Thery
2008-06-06 15:47 ` [PATCH 04/11] sysfs: Rename Support multiple superblocks Benjamin Thery
2008-06-06 15:47 ` [PATCH 05/11] sysfs: sysfs_chmod_file handle " Benjamin Thery
2008-06-06 15:47 ` [PATCH 06/11] sysfs: Implement sysfs tagged directory support Benjamin Thery
2008-06-06 15:48 ` [PATCH 07/11] sysfs: Implement sysfs_delete_link and sysfs_rename_link Benjamin Thery
2008-06-06 15:48 ` [PATCH 08/11] driver core: Implement tagged directory support for device classes Benjamin Thery
2008-06-06 15:48 ` [PATCH 09/11] sysfs: add sysfs_ns_exit routine Benjamin Thery
2008-06-06 15:48 ` [PATCH 10/11] netns: Enable tagging for net_class directories in sysfs Benjamin Thery
2008-06-06 15:48 ` [PATCH 11/11] sysfs: user namespaces: fix bug with clone(CLONE_NEWUSER) with fairsched Benjamin Thery
2008-06-10 22:41 ` Serge E. Hallyn
2008-06-10 22:50 ` Serge E. Hallyn [this message]
2008-06-10 23:00 ` [PATCH 00/11] sysfs tagged directories V5 Greg KH
2008-06-13 12:17 ` Benjamin Thery
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=20080610225024.GB22478@us.ibm.com \
--to=serue@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=benjamin.thery@bull.net \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®