1 #include <linux/sched.h>
3 #include <linux/sysctl.h>
4 #include <linux/swapctl.h>
5 #include <linux/proc_fs.h>
6 #include <linux/malloc.h>
7 #include <linux/stat.h>
8 #include <linux/ctype.h>
9 #include <asm/bitops.h>
10 #include <asm/segment.h>
11 #include <asm/uaccess.h>
12 #include <linux/utsname.h>
15 struct ctl_table_header *obdfs_table_header = NULL;
17 int obdfs_debug_level = 4095;
18 int obdfs_print_entry = 1;
21 #define OBDFS_SYSCTL 1
23 #define OBDFS_DEBUG 1 /* control debugging */
24 #define OBDFS_ENTRY 2 /* control enter/leave pattern */
25 #define OBDFS_TIMEOUT 3 /* timeout on upcalls to become intrble */
26 #define OBDFS_HARD 4 /* mount type "hard" or "soft" */
31 #define OBDFS_VARS_SLOT 2
34 static ctl_table obdfs_table[] = {
35 {OBDFS_DEBUG, "debug", &obdfs_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
36 {OBDFS_ENTRY, "trace", &obdfs_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
40 static ctl_table jukebox_table[] = {
41 {OBDFS_SYSCTL, "obdfs", NULL, 0, 0555, obdfs_table},
46 void obdfs_sysctl_init (void)
50 if ( !obdfs_table_header )
51 obdfs_table_header = register_sysctl_table(jukebox_table, 0);
55 void obdfs_sysctl_clean (void)
58 if ( obdfs_table_header )
59 unregister_sysctl_table(obdfs_table_header);
60 obdfs_table_header = NULL;