summaryrefslogtreecommitdiffstats
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2010-05-03 16:23:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 09:37:31 -0700
commitbe867b194a3ae3c680c29521287ae49b4d44d420 (patch)
tree1b3ad125d02603c6a9cc4bb8ae518695d7c6a66d /include/linux/kobject.h
parentf349cf34731c3b3eddbcd63cb04489aee2c405bd (diff)
downloadop-kernel-dev-be867b194a3ae3c680c29521287ae49b4d44d420.zip
op-kernel-dev-be867b194a3ae3c680c29521287ae49b4d44d420.tar.gz
sysfs: Comment sysfs directory tagging logic
Add some in-line comments to explain the new infrastructure, which was introduced to support sysfs directory tagging with namespaces. I think an overall description someplace might be good too, but it didn't really seem to fit into Documentation/filesystems/sysfs.txt, which appears more geared toward users, rather than maintainers, of sysfs. (Tejun, please let me know if I can make anything clearer or failed altogether to comment something that should be commented.) Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index d9456f6..b60d2df 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -136,12 +136,23 @@ struct kobj_attribute {
extern const struct sysfs_ops kobj_sysfs_ops;
+/*
+ * Namespace types which are used to tag kobjects and sysfs entries.
+ * Network namespace will likely be the first.
+ */
enum kobj_ns_type {
KOBJ_NS_TYPE_NONE = 0,
KOBJ_NS_TYPES
};
struct sock;
+
+/*
+ * Callbacks so sysfs can determine namespaces
+ * @current_ns: return calling task's namespace
+ * @netlink_ns: return namespace to which a sock belongs (right?)
+ * @initial_ns: return the initial namespace (i.e. init_net_ns)
+ */
struct kobj_ns_type_operations {
enum kobj_ns_type type;
const void *(*current_ns)(void);
OpenPOWER on IntegriCloud