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>
14 #include <linux/sim_obd.h>
15 #include <linux/presto.h>
16 #include <linux/obd_psdev.h>
17 #include <linux/presto_upcall.h>
19 struct ctl_table_header *obdfs_table_header = NULL;
21 int obdfs_debug_level = 4095;
22 int obdfs_print_entry = 1;
25 #define OBDFS_SYSCTL 1
27 #define OBDFS_DEBUG 1 /* control debugging */
28 #define OBDFS_ENTRY 2 /* control enter/leave pattern */
29 #define OBDFS_TIMEOUT 3 /* timeout on upcalls to become intrble */
30 #define OBDFS_HARD 4 /* mount type "hard" or "soft" */
35 #define OBDFS_VARS_SLOT 2
37 static ctl_table obdfs_table[] = {
38 {OBDFS_DEBUG, "debug", &obdfs_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
39 {OBDFS_ENTRY, "trace", &obdfs_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
43 static ctl_table jukebox_table[] = {
44 {OBDFS_SYSCTL, "obdfs", NULL, 0, 0555, obdfs_table},
48 void obdfs_sysctl_init (void)
51 if ( !obdfs_table_header )
52 obdfs_table_header = register_sysctl_table(jukebox_table, 0);
56 void obdfs_sysctl_clean (void)
59 if ( obdfs_table_header )
60 unregister_sysctl_table(obdfs_table_header);
61 obdfs_table_header = NULL;