2 * Copyright (C) 2001 Cluster File Systems, Inc.
4 * This code is issued under the GNU General Public License.
5 * See the file COPYING in this distribution
7 #include <linux/sched.h>
9 #include <linux/sysctl.h>
10 #include <linux/swapctl.h>
11 #include <linux/proc_fs.h>
12 #include <linux/slab.h>
13 #include <linux/stat.h>
14 #include <linux/ctype.h>
15 #include <asm/bitops.h>
16 #include <asm/segment.h>
17 #include <asm/uaccess.h>
18 #include <linux/utsname.h>
21 struct ctl_table_header *obdfs_table_header = NULL;
23 int obdfs_debug_level = 0;
24 int obdfs_print_entry = 1;
27 #define OBDFS_SYSCTL 1
29 #define OBDFS_DEBUG 1 /* control debugging */
30 #define OBDFS_ENTRY 2 /* control enter/leave pattern */
31 #define OBDFS_TIMEOUT 3 /* timeout on upcalls to become intrble */
32 #define OBDFS_HARD 4 /* mount type "hard" or "soft" */
37 #define OBDFS_VARS_SLOT 2
39 static ctl_table obdfs_table[] = {
40 {OBDFS_DEBUG, "debug", &obdfs_debug_level, sizeof(int), 0644, NULL, &proc_dointvec},
41 {OBDFS_ENTRY, "trace", &obdfs_print_entry, sizeof(int), 0644, NULL, &proc_dointvec},
45 static ctl_table top_table[] = {
46 {OBDFS_SYSCTL, "obdfs", NULL, 0, 0555, obdfs_table},
50 void obdfs_sysctl_init (void)
54 if ( !obdfs_table_header )
55 obdfs_table_header = register_sysctl_table(top_table, 0);
59 void obdfs_sysctl_clean (void)
62 if ( obdfs_table_header )
63 unregister_sysctl_table(obdfs_table_header);
64 obdfs_table_header = NULL;