aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-07-03 16:34:52 -0400
committerBrian Behlendorf <[email protected]>2013-07-08 15:25:18 -0700
commitf2a745c41df44c32149abb27b80e92cede772551 (patch)
tree59b7c99f5e1685c82aabf93e01b55ab76183b477 /include
parent79a7ab25812d2701230aaff62904570ef7dbecef (diff)
Linux 3.10 compat: Do not rely on struct proc_dir_entry definition
Linux kernel commit torvalds/linux#59d8053f moved the definition of struct proc_dir_entry from include/linux/proc_fs.h to the private header fs/proc/internal.h. The SPL relied on that to map Solaris' kstat to entries in /proc/spl/kstat. Since the proc_dir_entry structure is now private the only safe thing to do is wrap the opaque proc handle with our own structure. This actually ends up simplify the code and is good because it moves us away from depending on implementation details of /proc. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #257
Diffstat (limited to 'include')
-rw-r--r--include/linux/proc_compat.h3
-rw-r--r--include/sys/kstat.h8
2 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h
index 434ffa3f1..7b044e7e1 100644
--- a/include/linux/proc_compat.h
+++ b/include/linux/proc_compat.h
@@ -43,9 +43,6 @@
#endif
extern struct proc_dir_entry *proc_spl_kstat;
-struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root,
- const char *str);
-int proc_dir_entries(struct proc_dir_entry *root);
int spl_proc_init(void);
void spl_proc_fini(void);
diff --git a/include/sys/kstat.h b/include/sys/kstat.h
index 9275c1ea4..da3c5899d 100644
--- a/include/sys/kstat.h
+++ b/include/sys/kstat.h
@@ -83,6 +83,13 @@ struct kstat_s;
typedef int kid_t; /* unique kstat id */
typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */
+typedef struct kstat_module {
+ char ksm_name[KSTAT_STRLEN+1]; /* module name */
+ struct list_head ksm_module_list; /* module linkage */
+ struct list_head ksm_kstat_list; /* list of kstat entries */
+ struct proc_dir_entry *ksm_proc; /* proc entry */
+} kstat_module_t;
+
typedef struct kstat_s {
int ks_magic; /* magic value */
kid_t ks_kid; /* unique kstat ID */
@@ -102,6 +109,7 @@ typedef struct kstat_s {
void *ks_private; /* private data */
kmutex_t ks_lock; /* kstat data lock */
struct list_head ks_list; /* kstat linkage */
+ kstat_module_t *ks_owner; /* kstat module linkage */
} kstat_t;
typedef struct kstat_named_s {