Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory support.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Eric W. Biederman <ebiederm@...>
Cc: Benjamin Thery <benjamin.thery@...>, Greg Kroah-Hartman <gregkh@...>, Andrew Morton <akpm@...>, Daniel Lezcano <dlezcano@...>, Serge Hallyn <serue@...>, <linux-kernel@...>, Al Viro <viro@...>, Linux Containers <containers@...>
Date: Tuesday, July 1, 2008 - 6:30 am

Hello,

Eric W. Biederman wrote:

Yeap, that we can do.


How so?  sysfs_sb->bitmap which contains enough bits for all the defined
tags and determining whether a sd should be shown or not is as simple as
single test_bit.


What I'm feeling unease about is the extra level of abstraction added by
tag types.  A sd is given a tag.  A sb shows a set of tags.  The most
straight forward to implement that is to give sd a tag and test the tag
against sb's set of tags.  The type is added because pointer tag
requires sequential matching which is usually best to avoid.  It's
nothing fundamental.  It's an extra baggage.


The thing is that I don't really see why there's tagged_dir_ops at all.
 What's needed is tagged sd's and sb's which can show subset of those
tags, so adding callback ops for tags just doesn't make much sense to
me.  The interface should ideally be...

1. alloc/release tag
2. set / change / remove tag on sd
3. enable / disable tag on a sb

This has been my opinion from the beginning.  Unless the tags need to be
changed dynamically on demand (which I hope is not the case), there just
is plainly no reason to have callbacks for tags.

Thanks.

-- 
tejun
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory su..., Eric W. Biederman, (Thu Jun 26, 4:21 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory su..., Eric W. Biederman, (Mon Jun 30, 2:56 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory su..., Tejun Heo, (Tue Jul 1, 6:30 am)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory su..., Eric W. Biederman, (Tue Jul 1, 11:53 pm)
Re: [PATCH 06/11] sysfs: Implement sysfs tagged directory su..., Eric W. Biederman, (Wed Jul 2, 12:49 pm)
[PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Thu Jul 3, 8:48 pm)
Re: [PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Sun Jul 6, 12:42 am)
Re: [PATCH 00/15] sysfs support for namespaces, Cornelia Huck, (Mon Jul 7, 7:41 am)
Re: [PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Mon Jul 7, 8:22 am)
Re: [PATCH 00/15] sysfs support for namespaces, Eric W. Biederman, (Thu Jul 3, 9:27 pm)
[PATCH 02/15] sysfs: Support for preventing unmounts., Eric W. Biederman, (Thu Jul 3, 9:07 pm)
[PATCH 03/15] sysfs: sysfs_get_dentry add a sb parameter, Eric W. Biederman, (Thu Jul 3, 9:08 pm)
[PATCH 04/15] sysfs: Implement __sysfs_get_dentry, Eric W. Biederman, (Thu Jul 3, 9:09 pm)
[PATCH 05/15] sysfs: Rename Support multiple superblocks, Eric W. Biederman, (Thu Jul 3, 9:10 pm)
[PATCH 06/15] Introduce sysfs_sd_setattr and fix sysfs_chmod, Eric W. Biederman, (Thu Jul 3, 9:11 pm)
[PATCH 08/15] sysfs: Make sysfs_mount static once again., Eric W. Biederman, (Thu Jul 3, 9:14 pm)
[PATCH 0/8] sysfs namespace support, Eric W. Biederman, (Thu Aug 21, 2:31 am)
[PATCH 1/8] sysfs: Implement sysfs tagged directory support., Eric W. Biederman, (Thu Aug 21, 2:33 am)
Re: [PATCH 1/8] sysfs: Implement sysfs tagged directory supp..., Eric W. Biederman, (Mon Oct 13, 11:20 pm)
[PATCH 2/8] sysfs: Merge sysfs_rename_dir and sysfs_move_dir, Eric W. Biederman, (Thu Aug 21, 2:34 am)
[PATCH 3/8] sysfs: Implement sysfs_delete_link and sysfs_ren..., Eric W. Biederman, (Thu Aug 21, 2:35 am)
[PATCH 4/8] driver core: Implement tagged directory support ..., Eric W. Biederman, (Thu Aug 21, 2:37 am)
[PATCH 5/8] sysfs: Remove sysfs_create_link_nowarn, Eric W. Biederman, (Thu Aug 21, 2:36 am)
[PATCH 6/8] Revert "netns: Fix device renaming for sysfs", Eric W. Biederman, (Thu Aug 21, 2:38 am)
[PATCH 7/8] netns: Enable tagging for net_class directories ..., Eric W. Biederman, (Thu Aug 21, 2:39 am)
[PATCH 8/8] sysfs: user namespaces: fix bug with clone(CLONE..., Eric W. Biederman, (Thu Aug 21, 2:40 am)
Re: [PATCH 0/8] sysfs namespace support, David Miller, (Thu Aug 21, 2:37 am)
Re: [PATCH 09/15] sysfs: Implement sysfs tagged directory su..., Eric W. Biederman, (Wed Aug 20, 2:58 am)
Re: [PATCH 12/15] driver core: Implement tagged directory su..., Eric W. Biederman, (Sun Jul 13, 9:54 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory su..., Eric W. Biederman, (Fri Jul 18, 4:19 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory su..., Eric W. Biederman, (Wed Jul 16, 1:41 am)
Re: [PATCH 12/15] driver core: Implement tagged directory su..., Eric W. Biederman, (Wed Jul 16, 2:32 am)
Re: [PATCH 12/15] driver core: Implement tagged directory su..., Eric W. Biederman, (Wed Jul 16, 5:09 pm)
Re: [PATCH 12/15] driver core: Implement tagged directory su..., Eric W. Biederman, (Wed Jul 16, 3:07 pm)
[PATCH 13/15] Revert "netns: Fix device renaming for sysfs", Eric W. Biederman, (Thu Jul 3, 9:21 pm)