aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/sysctl.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /fs/nfs/sysctl.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/nfs/sysctl.c')
-rw-r--r--fs/nfs/sysctl.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c
index b62481dabae9..ad4d2e787b20 100644
--- a/fs/nfs/sysctl.c
+++ b/fs/nfs/sysctl.c
@@ -15,70 +15,64 @@
15 15
16#include "callback.h" 16#include "callback.h"
17 17
18#ifdef CONFIG_NFS_V4
18static const int nfs_set_port_min = 0; 19static const int nfs_set_port_min = 0;
19static const int nfs_set_port_max = 65535; 20static const int nfs_set_port_max = 65535;
21#endif
20static struct ctl_table_header *nfs_callback_sysctl_table; 22static struct ctl_table_header *nfs_callback_sysctl_table;
21 23
22static ctl_table nfs_cb_sysctls[] = { 24static ctl_table nfs_cb_sysctls[] = {
23#ifdef CONFIG_NFS_V4 25#ifdef CONFIG_NFS_V4
24 { 26 {
25 .ctl_name = CTL_UNNUMBERED,
26 .procname = "nfs_callback_tcpport", 27 .procname = "nfs_callback_tcpport",
27 .data = &nfs_callback_set_tcpport, 28 .data = &nfs_callback_set_tcpport,
28 .maxlen = sizeof(int), 29 .maxlen = sizeof(int),
29 .mode = 0644, 30 .mode = 0644,
30 .proc_handler = &proc_dointvec_minmax, 31 .proc_handler = proc_dointvec_minmax,
31 .extra1 = (int *)&nfs_set_port_min, 32 .extra1 = (int *)&nfs_set_port_min,
32 .extra2 = (int *)&nfs_set_port_max, 33 .extra2 = (int *)&nfs_set_port_max,
33 }, 34 },
34 { 35 {
35 .ctl_name = CTL_UNNUMBERED,
36 .procname = "idmap_cache_timeout", 36 .procname = "idmap_cache_timeout",
37 .data = &nfs_idmap_cache_timeout, 37 .data = &nfs_idmap_cache_timeout,
38 .maxlen = sizeof(int), 38 .maxlen = sizeof(int),
39 .mode = 0644, 39 .mode = 0644,
40 .proc_handler = &proc_dointvec_jiffies, 40 .proc_handler = proc_dointvec_jiffies,
41 .strategy = &sysctl_jiffies,
42 }, 41 },
43#endif 42#endif
44 { 43 {
45 .ctl_name = CTL_UNNUMBERED,
46 .procname = "nfs_mountpoint_timeout", 44 .procname = "nfs_mountpoint_timeout",
47 .data = &nfs_mountpoint_expiry_timeout, 45 .data = &nfs_mountpoint_expiry_timeout,
48 .maxlen = sizeof(nfs_mountpoint_expiry_timeout), 46 .maxlen = sizeof(nfs_mountpoint_expiry_timeout),
49 .mode = 0644, 47 .mode = 0644,
50 .proc_handler = &proc_dointvec_jiffies, 48 .proc_handler = proc_dointvec_jiffies,
51 .strategy = &sysctl_jiffies,
52 }, 49 },
53 { 50 {
54 .ctl_name = CTL_UNNUMBERED,
55 .procname = "nfs_congestion_kb", 51 .procname = "nfs_congestion_kb",
56 .data = &nfs_congestion_kb, 52 .data = &nfs_congestion_kb,
57 .maxlen = sizeof(nfs_congestion_kb), 53 .maxlen = sizeof(nfs_congestion_kb),
58 .mode = 0644, 54 .mode = 0644,
59 .proc_handler = &proc_dointvec, 55 .proc_handler = proc_dointvec,
60 }, 56 },
61 { .ctl_name = 0 } 57 { }
62}; 58};
63 59
64static ctl_table nfs_cb_sysctl_dir[] = { 60static ctl_table nfs_cb_sysctl_dir[] = {
65 { 61 {
66 .ctl_name = CTL_UNNUMBERED,
67 .procname = "nfs", 62 .procname = "nfs",
68 .mode = 0555, 63 .mode = 0555,
69 .child = nfs_cb_sysctls, 64 .child = nfs_cb_sysctls,
70 }, 65 },
71 { .ctl_name = 0 } 66 { }
72}; 67};
73 68
74static ctl_table nfs_cb_sysctl_root[] = { 69static ctl_table nfs_cb_sysctl_root[] = {
75 { 70 {
76 .ctl_name = CTL_FS,
77 .procname = "fs", 71 .procname = "fs",
78 .mode = 0555, 72 .mode = 0555,
79 .child = nfs_cb_sysctl_dir, 73 .child = nfs_cb_sysctl_dir,
80 }, 74 },
81 { .ctl_name = 0 } 75 { }
82}; 76};
83 77
84int nfs_register_sysctl(void) 78int nfs_register_sysctl(void)