diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-12 13:07:51 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:25 -0500 |
commit | 70abc49b4f4a4ef04a6bd9852edbd047b480bed7 (patch) | |
tree | 7c9a266ff8838d7945106920a5f0251861a850a5 /net/sunrpc/sysctl.c | |
parent | ccdc28f81c91f7ef2dc6c28d27f50264b19e4dd5 (diff) |
SUNRPC: make SUNPRC clients list per network namespace context
This patch moves static SUNRPC clients list and it's lock to sunrpc_net
structure.
Currently this list is used only for debug purposes. But later it will be used
also for selecting clients by networks namespace on PipeFS mount/umount events.
Per-network namespace lists will make this faster and simplier.
Note: client list is taken from "init_net" network namespace context in
rpc_show_tasks(). This will be changed some day later with making SUNRPC
sysctl's per network namespace context.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sysctl.c')
-rw-r--r-- | net/sunrpc/sysctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index e65dcc613339..af7d339add9d 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/sunrpc/stats.h> | 20 | #include <linux/sunrpc/stats.h> |
21 | #include <linux/sunrpc/svc_xprt.h> | 21 | #include <linux/sunrpc/svc_xprt.h> |
22 | 22 | ||
23 | #include "netns.h" | ||
24 | |||
23 | /* | 25 | /* |
24 | * Declare the debug flags here | 26 | * Declare the debug flags here |
25 | */ | 27 | */ |
@@ -110,7 +112,7 @@ proc_dodebug(ctl_table *table, int write, | |||
110 | *(unsigned int *) table->data = value; | 112 | *(unsigned int *) table->data = value; |
111 | /* Display the RPC tasks on writing to rpc_debug */ | 113 | /* Display the RPC tasks on writing to rpc_debug */ |
112 | if (strcmp(table->procname, "rpc_debug") == 0) | 114 | if (strcmp(table->procname, "rpc_debug") == 0) |
113 | rpc_show_tasks(); | 115 | rpc_show_tasks(&init_net); |
114 | } else { | 116 | } else { |
115 | if (!access_ok(VERIFY_WRITE, buffer, left)) | 117 | if (!access_ok(VERIFY_WRITE, buffer, left)) |
116 | return -EFAULT; | 118 | return -EFAULT; |