summaryrefslogtreecommitdiffstats
path: root/include/linux/sysctl.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-07-15 06:33:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:11 -0400
commitae7edecc9b8810770a8e5cb9a466ea4bdcfa8401 (patch)
tree8c0a244f4aea3eca5d8edf45665266b007eb046e /include/linux/sysctl.h
parentbd7b1533cd6a68c734062aa69394bec7e2b1718e (diff)
downloadlinux-ae7edecc9b8810770a8e5cb9a466ea4bdcfa8401.tar.gz
linux-ae7edecc9b8810770a8e5cb9a466ea4bdcfa8401.tar.bz2
linux-ae7edecc9b8810770a8e5cb9a466ea4bdcfa8401.zip
[PATCH] sysctl: keep track of tree relationships
In a sense, that's the heart of the series. It's based on the following property of the trees we are actually asked to add: they can be split into stem that is already covered by registered trees and crown that is entirely new. IOW, if a/b and a/c/d are introduced by our tree, then a/c is also introduced by it. That allows to associate tree and table entry with each node in the union; while directory nodes might be covered by many trees, only one will cover the node by its crown. And that will allow much saner logics for /proc/sys in the next patches. This patch introduces the data structures needed to keep track of that. When adding a sysctl table, we find a "parent" one. Which is to say, find the deepest node on its stem that already is present in one of the tables from our table set or its ancestor sets. That table will be our parent and that node in it - attachment point. Add our table to list anchored in parent, have it refer the parent and contents of attachment point. Also remember where its crown lives. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r--include/linux/sysctl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 956264d09ba0..3f6599aeb0db 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -1083,6 +1083,9 @@ struct ctl_table_header
struct ctl_table *ctl_table_arg;
struct ctl_table_root *root;
struct ctl_table_set *set;
+ struct ctl_table *attached_by;
+ struct ctl_table *attached_to;
+ struct ctl_table_header *parent;
};
/* struct ctl_path describes where in the hierarchy a table is added */