Cc: Greg Kroah-Hartman <gregkh@...>, Andrew Morton <akpm@...>, Eric Biederman <ebiederm@...>, Daniel Lezcano <dlezcano@...>, Serge Hallyn <serue@...>, <linux-kernel@...>, Al Viro <viro@...>, Linux Containers <containers@...>
As only directories can be tagged, I suppose handling tags explicitly
isn't necessary here, right? Can we please add a comment explaning
that?
Taking both @kobj and @dir_sd is ugly but it isn't your fault. I'll
clean things up later.
As before, I can't bring myself to like this interface. Is computing
tags dynamically really necessary? Can't we do the followings?
tag = sysfs_allocate_tag(s);
sysfs_enable_tag(kobj (or sd), tag);
sysfs_sb_show_tag(sb, tag);
Where tags are allocated using ida and each sb has bitmap of enabled
tags so that sysfs ops can simply use something like the following to
test whether it's enabled.
bool sysfs_tag_enabled(sb, tag)
{
return sysfs_info(sb)->tag_map & (1 << tag);
}
Tags which can change dynamically seems too confusing to me and it
makes things difficult to verify as it's unclear how those tags are
gonna to change.
Thanks.
--
tejun
--