Blame view
fs/nfs/sysctl.c
1.26 KB
a72b44222
|
1 2 3 4 5 |
/* * linux/fs/nfs/sysctl.c * * Sysctl interface to NFS parameters */ |
a72b44222
|
6 7 8 9 10 11 |
#include <linux/types.h> #include <linux/linkage.h> #include <linux/ctype.h> #include <linux/fs.h> #include <linux/sysctl.h> #include <linux/module.h> |
51d8fa6a1
|
12 |
#include <linux/nfs_fs.h> |
a72b44222
|
13 |
|
a72b44222
|
14 |
static struct ctl_table_header *nfs_callback_sysctl_table; |
a72b44222
|
15 |
|
f5102e563
|
16 |
static struct ctl_table nfs_cb_sysctls[] = { |
51d8fa6a1
|
17 |
{ |
51d8fa6a1
|
18 19 20 21 |
.procname = "nfs_mountpoint_timeout", .data = &nfs_mountpoint_expiry_timeout, .maxlen = sizeof(nfs_mountpoint_expiry_timeout), .mode = 0644, |
6d4561110
|
22 |
.proc_handler = proc_dointvec_jiffies, |
51d8fa6a1
|
23 |
}, |
89a09141d
|
24 |
{ |
89a09141d
|
25 26 27 28 |
.procname = "nfs_congestion_kb", .data = &nfs_congestion_kb, .maxlen = sizeof(nfs_congestion_kb), .mode = 0644, |
6d4561110
|
29 |
.proc_handler = proc_dointvec, |
89a09141d
|
30 |
}, |
ab09203e3
|
31 |
{ } |
a72b44222
|
32 |
}; |
f5102e563
|
33 |
static struct ctl_table nfs_cb_sysctl_dir[] = { |
a72b44222
|
34 |
{ |
a72b44222
|
35 36 37 38 |
.procname = "nfs", .mode = 0555, .child = nfs_cb_sysctls, }, |
ab09203e3
|
39 |
{ } |
a72b44222
|
40 |
}; |
f5102e563
|
41 |
static struct ctl_table nfs_cb_sysctl_root[] = { |
a72b44222
|
42 |
{ |
a72b44222
|
43 44 45 46 |
.procname = "fs", .mode = 0555, .child = nfs_cb_sysctl_dir, }, |
ab09203e3
|
47 |
{ } |
a72b44222
|
48 49 50 51 |
}; int nfs_register_sysctl(void) { |
0b4d41471
|
52 |
nfs_callback_sysctl_table = register_sysctl_table(nfs_cb_sysctl_root); |
a72b44222
|
53 54 55 56 57 58 59 60 61 62 |
if (nfs_callback_sysctl_table == NULL) return -ENOMEM; return 0; } void nfs_unregister_sysctl(void) { unregister_sysctl_table(nfs_callback_sysctl_table); nfs_callback_sysctl_table = NULL; } |