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 #include <linux/config.h>
20 extern afs_int32 afs_new_inum;
22 /* From afs_analyze.c */
23 extern afs_int32 hm_retry_RO;
24 extern afs_int32 hm_retry_RW;
25 extern afs_int32 hm_retry_int;
26 extern afs_int32 afs_blocksUsed_0;
27 extern afs_int32 afs_blocksUsed_1;
28 extern afs_int32 afs_blocksUsed_2;
29 extern afs_int32 afs_pct1;
30 extern afs_int32 afs_pct2;
33 static struct ctl_table_header *afs_sysctl = NULL;
35 static ctl_table afs_sysctl_table[] = {
37 &hm_retry_RO, sizeof(afs_int32), 0644, NULL,
41 &hm_retry_RW, sizeof(afs_int32), 0644, NULL,
45 &hm_retry_int, sizeof(afs_int32), 0644, NULL,
49 &afs_gcpags, sizeof(afs_int32), 0644, NULL,
53 &afs_rx_deadtime, sizeof(afs_int32), 0644, NULL,
57 &afs_bkvolpref, sizeof(afs_int32), 0644, NULL,
61 &afs_blocksUsed, sizeof(afs_int32), 0444, NULL,
64 {8, "afs_blocksUsed_0",
65 &afs_blocksUsed_0, sizeof(afs_int32), 0644, NULL,
68 {9, "afs_blocksUsed_1",
69 &afs_blocksUsed_1, sizeof(afs_int32), 0644, NULL,
72 {10, "afs_blocksUsed_2",
73 &afs_blocksUsed_2, sizeof(afs_int32), 0644, NULL,
77 &afs_pct1, sizeof(afs_int32), 0644, NULL,
81 &afs_pct2, sizeof(afs_int32), 0644, NULL,
84 {13, "afs_cacheBlocks",
85 &afs_cacheBlocks, sizeof(afs_int32), 0644, NULL,
89 &afs_new_inum, sizeof(afs_int32), 0644, NULL,
95 static ctl_table fs_sysctl_table[] = {
96 {1, "afs", NULL, 0, 0555, afs_sysctl_table},
103 afs_sysctl = register_sysctl_table(fs_sysctl_table, 0);
114 unregister_sysctl_table(afs_sysctl);
119 #endif /* CONFIG_SYSCTL */