2 * osi_sysctl.c: Linux sysctl interface to OpenAFS
6 * Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
10 #include "afs/param.h"
12 #include "afs/sysincludes.h" /* Standard vendor system headers */
13 #include "afsincludes.h" /* Afs-based standard headers */
14 #include "afs/afs_stats.h" /* afs statistics */
16 #include <linux/sysctl.h>
17 #ifdef CONFIG_H_EXISTS
18 #include <linux/config.h>
22 extern afs_int32 afs_new_inum;
24 /* From afs_analyze.c */
25 extern afs_int32 hm_retry_RO;
26 extern afs_int32 hm_retry_RW;
27 extern afs_int32 hm_retry_int;
28 extern afs_int32 afs_blocksUsed_0;
29 extern afs_int32 afs_blocksUsed_1;
30 extern afs_int32 afs_blocksUsed_2;
31 extern afs_int32 afs_pct1;
32 extern afs_int32 afs_pct2;
35 static struct ctl_table_header *afs_sysctl = NULL;
37 static ctl_table afs_sysctl_table[] = {
39 &hm_retry_RO, sizeof(afs_int32), 0644, NULL,
43 &hm_retry_RW, sizeof(afs_int32), 0644, NULL,
47 &hm_retry_int, sizeof(afs_int32), 0644, NULL,
51 &afs_gcpags, sizeof(afs_int32), 0644, NULL,
55 &afs_rx_deadtime, sizeof(afs_int32), 0644, NULL,
59 &afs_bkvolpref, sizeof(afs_int32), 0644, NULL,
63 &afs_blocksUsed, sizeof(afs_int32), 0444, NULL,
66 {8, "afs_blocksUsed_0",
67 &afs_blocksUsed_0, sizeof(afs_int32), 0644, NULL,
70 {9, "afs_blocksUsed_1",
71 &afs_blocksUsed_1, sizeof(afs_int32), 0644, NULL,
74 {10, "afs_blocksUsed_2",
75 &afs_blocksUsed_2, sizeof(afs_int32), 0644, NULL,
79 &afs_pct1, sizeof(afs_int32), 0644, NULL,
83 &afs_pct2, sizeof(afs_int32), 0644, NULL,
86 {13, "afs_cacheBlocks",
87 &afs_cacheBlocks, sizeof(afs_int32), 0644, NULL,
91 &afs_new_inum, sizeof(afs_int32), 0644, NULL,
97 static ctl_table fs_sysctl_table[] = {
98 {1, "afs", NULL, 0, 0555, afs_sysctl_table},
105 afs_sysctl = register_sysctl_table(fs_sysctl_table, 0);
116 unregister_sysctl_table(afs_sysctl);
121 #endif /* CONFIG_SYSCTL */