* [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware
@ 2011-12-06 13:42 Stanislav Kinsbursky
2011-12-06 13:42 ` [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context Stanislav Kinsbursky
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Stanislav Kinsbursky @ 2011-12-06 13:42 UTC (permalink / raw)
To: Trond.Myklebust
Cc: linux-nfs, xemul, neilb, netdev, linux-kernel, jbottomley,
bfields, davem, devel
This is one more precursor patch set. Both patches in the series will be used
later for creating /proc entries for NFS and NFSd statistics per network
namespace context.
The following series consists of:
---
Stanislav Kinsbursky (2):
SUNRPC: register RPC stats /proc entries in passed network namespace context
SUNRPC: register service stats /proc entries in passed network namespace context
fs/nfs/inode.c | 6 +++---
fs/nfsd/stats.c | 5 +++--
include/linux/sunrpc/stats.h | 16 ++++++++--------
net/sunrpc/stats.c | 21 +++++++++++----------
4 files changed, 25 insertions(+), 23 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context
2011-12-06 13:42 [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
@ 2011-12-06 13:42 ` Stanislav Kinsbursky
2011-12-06 21:33 ` J. Bruce Fields
2012-01-30 18:29 ` Paul Gortmaker
2011-12-06 13:42 ` [PATCH 2/2] SUNRPC: register service " Stanislav Kinsbursky
2012-01-20 11:34 ` [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
2 siblings, 2 replies; 11+ messages in thread
From: Stanislav Kinsbursky @ 2011-12-06 13:42 UTC (permalink / raw)
To: Trond.Myklebust
Cc: linux-nfs, xemul, neilb, netdev, linux-kernel, jbottomley,
bfields, davem, devel
This patch makes it possible to create NFS program entry ("/proc/net/rpc/nfs")
in passed network namespace context instead of hard-coded "init_net".
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
---
fs/nfs/inode.c | 6 +++---
include/linux/sunrpc/stats.h | 8 ++++----
net/sunrpc/stats.c | 15 ++++++++-------
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 98b2508..5cad6c5 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1623,14 +1623,14 @@ static int __init init_nfs_fs(void)
goto out0;
#ifdef CONFIG_PROC_FS
- rpc_proc_register(&nfs_rpcstat);
+ rpc_proc_register(&init_net, &nfs_rpcstat);
#endif
if ((err = register_nfs_fs()) != 0)
goto out;
return 0;
out:
#ifdef CONFIG_PROC_FS
- rpc_proc_unregister("nfs");
+ rpc_proc_unregister(&init_net, "nfs");
#endif
nfs_destroy_directcache();
out0:
@@ -1669,7 +1669,7 @@ static void __exit exit_nfs_fs(void)
nfs_dns_resolver_destroy();
nfs_idmap_quit();
#ifdef CONFIG_PROC_FS
- rpc_proc_unregister("nfs");
+ rpc_proc_unregister(&init_net, "nfs");
#endif
nfs_cleanup_cb_ident_idr();
unregister_nfs_fs();
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
index 680471d..f625b57 100644
--- a/include/linux/sunrpc/stats.h
+++ b/include/linux/sunrpc/stats.h
@@ -58,8 +58,8 @@ void rpc_modcount(struct inode *, int);
#endif
#ifdef CONFIG_PROC_FS
-struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
-void rpc_proc_unregister(const char *);
+struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
+void rpc_proc_unregister(struct net *,const char *);
void rpc_proc_zero(struct rpc_program *);
struct proc_dir_entry * svc_proc_register(struct svc_stat *,
const struct file_operations *);
@@ -69,8 +69,8 @@ void svc_seq_show(struct seq_file *,
const struct svc_stat *);
#else
-static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; }
-static inline void rpc_proc_unregister(const char *p) {}
+static inline struct proc_dir_entry *rpc_proc_register(struct net *, struct rpc_stat *s) { return NULL; }
+static inline void rpc_proc_unregisterstruct net *, (const char *p) {}
static inline void rpc_proc_zero(struct rpc_program *p) {}
static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index 80df89d..f0f6e7c 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -213,28 +213,29 @@ EXPORT_SYMBOL_GPL(rpc_print_iostats);
* Register/unregister RPC proc files
*/
static inline struct proc_dir_entry *
-do_register(const char *name, void *data, const struct file_operations *fops)
+do_register(struct net *net, const char *name, void *data,
+ const struct file_operations *fops)
{
struct sunrpc_net *sn;
dprintk("RPC: registering /proc/net/rpc/%s\n", name);
- sn = net_generic(&init_net, sunrpc_net_id);
+ sn = net_generic(net, sunrpc_net_id);
return proc_create_data(name, 0, sn->proc_net_rpc, fops, data);
}
struct proc_dir_entry *
-rpc_proc_register(struct rpc_stat *statp)
+rpc_proc_register(struct net *net, struct rpc_stat *statp)
{
- return do_register(statp->program->name, statp, &rpc_proc_fops);
+ return do_register(net, statp->program->name, statp, &rpc_proc_fops);
}
EXPORT_SYMBOL_GPL(rpc_proc_register);
void
-rpc_proc_unregister(const char *name)
+rpc_proc_unregister(struct net *net, const char *name)
{
struct sunrpc_net *sn;
- sn = net_generic(&init_net, sunrpc_net_id);
+ sn = net_generic(net, sunrpc_net_id);
remove_proc_entry(name, sn->proc_net_rpc);
}
EXPORT_SYMBOL_GPL(rpc_proc_unregister);
@@ -242,7 +243,7 @@ EXPORT_SYMBOL_GPL(rpc_proc_unregister);
struct proc_dir_entry *
svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
{
- return do_register(statp->program->pg_name, statp, fops);
+ return do_register(&init_net, statp->program->pg_name, statp, fops);
}
EXPORT_SYMBOL_GPL(svc_proc_register);
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/2] SUNRPC: register service stats /proc entries in passed network namespace context
2011-12-06 13:42 [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
2011-12-06 13:42 ` [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context Stanislav Kinsbursky
@ 2011-12-06 13:42 ` Stanislav Kinsbursky
2011-12-06 21:49 ` J. Bruce Fields
2012-01-20 11:34 ` [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
2 siblings, 1 reply; 11+ messages in thread
From: Stanislav Kinsbursky @ 2011-12-06 13:42 UTC (permalink / raw)
To: Trond.Myklebust
Cc: linux-nfs, xemul, neilb, netdev, linux-kernel, jbottomley,
bfields, davem, devel
This patch makes it possible to create NFSd program entry ("/proc/net/rpc/nfsd")
in passed network namespace context instead of hard-coded "init_net".
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
---
fs/nfsd/stats.c | 5 +++--
include/linux/sunrpc/stats.h | 8 ++++----
net/sunrpc/stats.c | 8 ++++----
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c
index a2e2402..6d4521f 100644
--- a/fs/nfsd/stats.c
+++ b/fs/nfsd/stats.c
@@ -25,6 +25,7 @@
#include <linux/module.h>
#include <linux/sunrpc/stats.h>
#include <linux/nfsd/stats.h>
+#include <net/net_namespace.h>
#include "nfsd.h"
@@ -94,11 +95,11 @@ static const struct file_operations nfsd_proc_fops = {
void
nfsd_stat_init(void)
{
- svc_proc_register(&nfsd_svcstats, &nfsd_proc_fops);
+ svc_proc_register(&init_net, &nfsd_svcstats, &nfsd_proc_fops);
}
void
nfsd_stat_shutdown(void)
{
- svc_proc_unregister("nfsd");
+ svc_proc_unregister(&init_net, "nfsd");
}
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
index f625b57..4720b12 100644
--- a/include/linux/sunrpc/stats.h
+++ b/include/linux/sunrpc/stats.h
@@ -61,9 +61,9 @@ void rpc_modcount(struct inode *, int);
struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
void rpc_proc_unregister(struct net *,const char *);
void rpc_proc_zero(struct rpc_program *);
-struct proc_dir_entry * svc_proc_register(struct svc_stat *,
+struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *,
const struct file_operations *);
-void svc_proc_unregister(const char *);
+void svc_proc_unregister(struct net *, const char *);
void svc_seq_show(struct seq_file *,
const struct svc_stat *);
@@ -73,9 +73,9 @@ static inline struct proc_dir_entry *rpc_proc_register(struct net *, struct rpc_
static inline void rpc_proc_unregisterstruct net *, (const char *p) {}
static inline void rpc_proc_zero(struct rpc_program *p) {}
-static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
+static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s,
const struct file_operations *f) { return NULL; }
-static inline void svc_proc_unregister(const char *p) {}
+static inline void svc_proc_unregister(struct net *net, const char *p) {}
static inline void svc_seq_show(struct seq_file *seq,
const struct svc_stat *st) {}
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
index f0f6e7c..3c4f688 100644
--- a/net/sunrpc/stats.c
+++ b/net/sunrpc/stats.c
@@ -241,18 +241,18 @@ rpc_proc_unregister(struct net *net, const char *name)
EXPORT_SYMBOL_GPL(rpc_proc_unregister);
struct proc_dir_entry *
-svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
+svc_proc_register(struct net *net, struct svc_stat *statp, const struct file_operations *fops)
{
- return do_register(&init_net, statp->program->pg_name, statp, fops);
+ return do_register(net, statp->program->pg_name, statp, fops);
}
EXPORT_SYMBOL_GPL(svc_proc_register);
void
-svc_proc_unregister(const char *name)
+svc_proc_unregister(struct net *net, const char *name)
{
struct sunrpc_net *sn;
- sn = net_generic(&init_net, sunrpc_net_id);
+ sn = net_generic(net, sunrpc_net_id);
remove_proc_entry(name, sn->proc_net_rpc);
}
EXPORT_SYMBOL_GPL(svc_proc_unregister);
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context
2011-12-06 13:42 ` [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context Stanislav Kinsbursky
@ 2011-12-06 21:33 ` J. Bruce Fields
2012-01-30 18:29 ` Paul Gortmaker
1 sibling, 0 replies; 11+ messages in thread
From: J. Bruce Fields @ 2011-12-06 21:33 UTC (permalink / raw)
To: Stanislav Kinsbursky
Cc: Trond.Myklebust, linux-nfs, xemul, neilb, netdev, linux-kernel,
jbottomley, davem, devel
On Tue, Dec 06, 2011 at 04:42:40PM +0300, Stanislav Kinsbursky wrote:
> This patch makes it possible to create NFS program entry ("/proc/net/rpc/nfs")
> in passed network namespace context instead of hard-coded "init_net".
Looks straightforward to me.
Acked-by: J. Bruce Fields <bfields@redhat.com>
--b.
>
> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
>
> ---
> fs/nfs/inode.c | 6 +++---
> include/linux/sunrpc/stats.h | 8 ++++----
> net/sunrpc/stats.c | 15 ++++++++-------
> 3 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
> index 98b2508..5cad6c5 100644
> --- a/fs/nfs/inode.c
> +++ b/fs/nfs/inode.c
> @@ -1623,14 +1623,14 @@ static int __init init_nfs_fs(void)
> goto out0;
>
> #ifdef CONFIG_PROC_FS
> - rpc_proc_register(&nfs_rpcstat);
> + rpc_proc_register(&init_net, &nfs_rpcstat);
> #endif
> if ((err = register_nfs_fs()) != 0)
> goto out;
> return 0;
> out:
> #ifdef CONFIG_PROC_FS
> - rpc_proc_unregister("nfs");
> + rpc_proc_unregister(&init_net, "nfs");
> #endif
> nfs_destroy_directcache();
> out0:
> @@ -1669,7 +1669,7 @@ static void __exit exit_nfs_fs(void)
> nfs_dns_resolver_destroy();
> nfs_idmap_quit();
> #ifdef CONFIG_PROC_FS
> - rpc_proc_unregister("nfs");
> + rpc_proc_unregister(&init_net, "nfs");
> #endif
> nfs_cleanup_cb_ident_idr();
> unregister_nfs_fs();
> diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
> index 680471d..f625b57 100644
> --- a/include/linux/sunrpc/stats.h
> +++ b/include/linux/sunrpc/stats.h
> @@ -58,8 +58,8 @@ void rpc_modcount(struct inode *, int);
> #endif
>
> #ifdef CONFIG_PROC_FS
> -struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
> -void rpc_proc_unregister(const char *);
> +struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
> +void rpc_proc_unregister(struct net *,const char *);
> void rpc_proc_zero(struct rpc_program *);
> struct proc_dir_entry * svc_proc_register(struct svc_stat *,
> const struct file_operations *);
> @@ -69,8 +69,8 @@ void svc_seq_show(struct seq_file *,
> const struct svc_stat *);
> #else
>
> -static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; }
> -static inline void rpc_proc_unregister(const char *p) {}
> +static inline struct proc_dir_entry *rpc_proc_register(struct net *, struct rpc_stat *s) { return NULL; }
> +static inline void rpc_proc_unregisterstruct net *, (const char *p) {}
> static inline void rpc_proc_zero(struct rpc_program *p) {}
>
> static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
> diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
> index 80df89d..f0f6e7c 100644
> --- a/net/sunrpc/stats.c
> +++ b/net/sunrpc/stats.c
> @@ -213,28 +213,29 @@ EXPORT_SYMBOL_GPL(rpc_print_iostats);
> * Register/unregister RPC proc files
> */
> static inline struct proc_dir_entry *
> -do_register(const char *name, void *data, const struct file_operations *fops)
> +do_register(struct net *net, const char *name, void *data,
> + const struct file_operations *fops)
> {
> struct sunrpc_net *sn;
>
> dprintk("RPC: registering /proc/net/rpc/%s\n", name);
> - sn = net_generic(&init_net, sunrpc_net_id);
> + sn = net_generic(net, sunrpc_net_id);
> return proc_create_data(name, 0, sn->proc_net_rpc, fops, data);
> }
>
> struct proc_dir_entry *
> -rpc_proc_register(struct rpc_stat *statp)
> +rpc_proc_register(struct net *net, struct rpc_stat *statp)
> {
> - return do_register(statp->program->name, statp, &rpc_proc_fops);
> + return do_register(net, statp->program->name, statp, &rpc_proc_fops);
> }
> EXPORT_SYMBOL_GPL(rpc_proc_register);
>
> void
> -rpc_proc_unregister(const char *name)
> +rpc_proc_unregister(struct net *net, const char *name)
> {
> struct sunrpc_net *sn;
>
> - sn = net_generic(&init_net, sunrpc_net_id);
> + sn = net_generic(net, sunrpc_net_id);
> remove_proc_entry(name, sn->proc_net_rpc);
> }
> EXPORT_SYMBOL_GPL(rpc_proc_unregister);
> @@ -242,7 +243,7 @@ EXPORT_SYMBOL_GPL(rpc_proc_unregister);
> struct proc_dir_entry *
> svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
> {
> - return do_register(statp->program->pg_name, statp, fops);
> + return do_register(&init_net, statp->program->pg_name, statp, fops);
> }
> EXPORT_SYMBOL_GPL(svc_proc_register);
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] SUNRPC: register service stats /proc entries in passed network namespace context
2011-12-06 13:42 ` [PATCH 2/2] SUNRPC: register service " Stanislav Kinsbursky
@ 2011-12-06 21:49 ` J. Bruce Fields
0 siblings, 0 replies; 11+ messages in thread
From: J. Bruce Fields @ 2011-12-06 21:49 UTC (permalink / raw)
To: Stanislav Kinsbursky
Cc: Trond.Myklebust, linux-nfs, xemul, neilb, netdev, linux-kernel,
jbottomley, davem, devel
On Tue, Dec 06, 2011 at 04:42:49PM +0300, Stanislav Kinsbursky wrote:
> This patch makes it possible to create NFSd program entry ("/proc/net/rpc/nfsd")
> in passed network namespace context instead of hard-coded "init_net".
Acked-by: J. Bruce Fields <bfields@redhat.com>
Or I can just apply it. I'll assume it's going through Trond's tree
unless I hear otherwise.
--b.
>
> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
>
> ---
> fs/nfsd/stats.c | 5 +++--
> include/linux/sunrpc/stats.h | 8 ++++----
> net/sunrpc/stats.c | 8 ++++----
> 3 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/fs/nfsd/stats.c b/fs/nfsd/stats.c
> index a2e2402..6d4521f 100644
> --- a/fs/nfsd/stats.c
> +++ b/fs/nfsd/stats.c
> @@ -25,6 +25,7 @@
> #include <linux/module.h>
> #include <linux/sunrpc/stats.h>
> #include <linux/nfsd/stats.h>
> +#include <net/net_namespace.h>
>
> #include "nfsd.h"
>
> @@ -94,11 +95,11 @@ static const struct file_operations nfsd_proc_fops = {
> void
> nfsd_stat_init(void)
> {
> - svc_proc_register(&nfsd_svcstats, &nfsd_proc_fops);
> + svc_proc_register(&init_net, &nfsd_svcstats, &nfsd_proc_fops);
> }
>
> void
> nfsd_stat_shutdown(void)
> {
> - svc_proc_unregister("nfsd");
> + svc_proc_unregister(&init_net, "nfsd");
> }
> diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
> index f625b57..4720b12 100644
> --- a/include/linux/sunrpc/stats.h
> +++ b/include/linux/sunrpc/stats.h
> @@ -61,9 +61,9 @@ void rpc_modcount(struct inode *, int);
> struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
> void rpc_proc_unregister(struct net *,const char *);
> void rpc_proc_zero(struct rpc_program *);
> -struct proc_dir_entry * svc_proc_register(struct svc_stat *,
> +struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *,
> const struct file_operations *);
> -void svc_proc_unregister(const char *);
> +void svc_proc_unregister(struct net *, const char *);
>
> void svc_seq_show(struct seq_file *,
> const struct svc_stat *);
> @@ -73,9 +73,9 @@ static inline struct proc_dir_entry *rpc_proc_register(struct net *, struct rpc_
> static inline void rpc_proc_unregisterstruct net *, (const char *p) {}
> static inline void rpc_proc_zero(struct rpc_program *p) {}
>
> -static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
> +static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s,
> const struct file_operations *f) { return NULL; }
> -static inline void svc_proc_unregister(const char *p) {}
> +static inline void svc_proc_unregister(struct net *net, const char *p) {}
>
> static inline void svc_seq_show(struct seq_file *seq,
> const struct svc_stat *st) {}
> diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
> index f0f6e7c..3c4f688 100644
> --- a/net/sunrpc/stats.c
> +++ b/net/sunrpc/stats.c
> @@ -241,18 +241,18 @@ rpc_proc_unregister(struct net *net, const char *name)
> EXPORT_SYMBOL_GPL(rpc_proc_unregister);
>
> struct proc_dir_entry *
> -svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
> +svc_proc_register(struct net *net, struct svc_stat *statp, const struct file_operations *fops)
> {
> - return do_register(&init_net, statp->program->pg_name, statp, fops);
> + return do_register(net, statp->program->pg_name, statp, fops);
> }
> EXPORT_SYMBOL_GPL(svc_proc_register);
>
> void
> -svc_proc_unregister(const char *name)
> +svc_proc_unregister(struct net *net, const char *name)
> {
> struct sunrpc_net *sn;
>
> - sn = net_generic(&init_net, sunrpc_net_id);
> + sn = net_generic(net, sunrpc_net_id);
> remove_proc_entry(name, sn->proc_net_rpc);
> }
> EXPORT_SYMBOL_GPL(svc_proc_unregister);
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware
2011-12-06 13:42 [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
2011-12-06 13:42 ` [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context Stanislav Kinsbursky
2011-12-06 13:42 ` [PATCH 2/2] SUNRPC: register service " Stanislav Kinsbursky
@ 2012-01-20 11:34 ` Stanislav Kinsbursky
2012-01-20 14:30 ` bfields
2 siblings, 1 reply; 11+ messages in thread
From: Stanislav Kinsbursky @ 2012-01-20 11:34 UTC (permalink / raw)
To: Trond.Myklebust, bfields
Cc: linux-nfs, Pavel Emelianov, neilb, netdev, linux-kernel,
James Bottomley, davem, devel
Excuse me, Trond, Bruce, but what about this patch set?
It is not included in Trond's "devel" branch.
Maybe they are in your repo, Bruce?
--
Best regards,
Stanislav Kinsbursky
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware
2012-01-20 11:34 ` [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
@ 2012-01-20 14:30 ` bfields
2012-01-20 14:39 ` Trond Myklebust
0 siblings, 1 reply; 11+ messages in thread
From: bfields @ 2012-01-20 14:30 UTC (permalink / raw)
To: Stanislav Kinsbursky
Cc: Trond.Myklebust, linux-nfs, Pavel Emelianov, neilb, netdev,
linux-kernel, James Bottomley, davem, devel
On Fri, Jan 20, 2012 at 03:34:07PM +0400, Stanislav Kinsbursky wrote:
> Excuse me, Trond, Bruce, but what about this patch set?
> It is not included in Trond's "devel" branch.
> Maybe they are in your repo, Bruce?
Everything that I had from you is in -rc1 now.
--b.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware
2012-01-20 14:30 ` bfields
@ 2012-01-20 14:39 ` Trond Myklebust
2012-01-20 16:16 ` Stanislav Kinsbursky
0 siblings, 1 reply; 11+ messages in thread
From: Trond Myklebust @ 2012-01-20 14:39 UTC (permalink / raw)
To: bfields
Cc: Stanislav Kinsbursky, linux-nfs, Pavel Emelianov, neilb, netdev,
linux-kernel, James Bottomley, davem, devel
On Fri, 2012-01-20 at 09:30 -0500, bfields@fieldses.org wrote:
> On Fri, Jan 20, 2012 at 03:34:07PM +0400, Stanislav Kinsbursky wrote:
> > Excuse me, Trond, Bruce, but what about this patch set?
> > It is not included in Trond's "devel" branch.
> > Maybe they are in your repo, Bruce?
>
> Everything that I had from you is in -rc1 now.
>
> --b.
I can carry these patches if you like. They don't seem to conflict with
anything already in my repository.
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware
2012-01-20 14:39 ` Trond Myklebust
@ 2012-01-20 16:16 ` Stanislav Kinsbursky
0 siblings, 0 replies; 11+ messages in thread
From: Stanislav Kinsbursky @ 2012-01-20 16:16 UTC (permalink / raw)
To: Trond Myklebust
Cc: bfields, linux-nfs, Pavel Emelianov, neilb, netdev, linux-kernel,
James Bottomley, davem, devel
20.01.2012 18:39, Trond Myklebust пишет:
> On Fri, 2012-01-20 at 09:30 -0500, bfields@fieldses.org wrote:
>> On Fri, Jan 20, 2012 at 03:34:07PM +0400, Stanislav Kinsbursky wrote:
>>> Excuse me, Trond, Bruce, but what about this patch set?
>>> It is not included in Trond's "devel" branch.
>>> Maybe they are in your repo, Bruce?
>>
>> Everything that I had from you is in -rc1 now.
>>
>> --b.
>
> I can carry these patches if you like. They don't seem to conflict with
> anything already in my repository.
>
Yes, would be great. Thank you.
--
Best regards,
Stanislav Kinsbursky
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context
2011-12-06 13:42 ` [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context Stanislav Kinsbursky
2011-12-06 21:33 ` J. Bruce Fields
@ 2012-01-30 18:29 ` Paul Gortmaker
2012-01-30 20:49 ` Myklebust, Trond
1 sibling, 1 reply; 11+ messages in thread
From: Paul Gortmaker @ 2012-01-30 18:29 UTC (permalink / raw)
To: Stanislav Kinsbursky, Trond.Myklebust, rdunlap
Cc: linux-nfs, xemul, neilb, netdev, linux-kernel, jbottomley,
bfields, davem, devel
On Tue, Dec 6, 2011 at 8:42 AM, Stanislav Kinsbursky
<skinsbursky@parallels.com> wrote:
> This patch makes it possible to create NFS program entry ("/proc/net/rpc/nfs")
> in passed network namespace context instead of hard-coded "init_net".
Hi Trond,
Is this patch going to be dropped and re-submitted? It has obvious
typos that have been causing reported build failures[1] in linux-next
for a week now. In addition to that, it has several whitespace errors
(long lines, no space after comma, etc.) that I bet checkpatch.pl
would have found, if it was used.
Commit 4494c750240bab1bb83bd8f4d5a268663c37c9b3 in next-20120130.
Thanks,
Paul.
[1] http://www.spinics.net/lists/linux-next/msg18488.html
>
> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
>
> ---
> fs/nfs/inode.c | 6 +++---
> include/linux/sunrpc/stats.h | 8 ++++----
> net/sunrpc/stats.c | 15 ++++++++-------
> 3 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
> index 98b2508..5cad6c5 100644
> --- a/fs/nfs/inode.c
> +++ b/fs/nfs/inode.c
> @@ -1623,14 +1623,14 @@ static int __init init_nfs_fs(void)
> goto out0;
>
> #ifdef CONFIG_PROC_FS
> - rpc_proc_register(&nfs_rpcstat);
> + rpc_proc_register(&init_net, &nfs_rpcstat);
> #endif
> if ((err = register_nfs_fs()) != 0)
> goto out;
> return 0;
> out:
> #ifdef CONFIG_PROC_FS
> - rpc_proc_unregister("nfs");
> + rpc_proc_unregister(&init_net, "nfs");
> #endif
> nfs_destroy_directcache();
> out0:
> @@ -1669,7 +1669,7 @@ static void __exit exit_nfs_fs(void)
> nfs_dns_resolver_destroy();
> nfs_idmap_quit();
> #ifdef CONFIG_PROC_FS
> - rpc_proc_unregister("nfs");
> + rpc_proc_unregister(&init_net, "nfs");
> #endif
> nfs_cleanup_cb_ident_idr();
> unregister_nfs_fs();
> diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
> index 680471d..f625b57 100644
> --- a/include/linux/sunrpc/stats.h
> +++ b/include/linux/sunrpc/stats.h
> @@ -58,8 +58,8 @@ void rpc_modcount(struct inode *, int);
> #endif
>
> #ifdef CONFIG_PROC_FS
> -struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
> -void rpc_proc_unregister(const char *);
> +struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
> +void rpc_proc_unregister(struct net *,const char *);
> void rpc_proc_zero(struct rpc_program *);
> struct proc_dir_entry * svc_proc_register(struct svc_stat *,
> const struct file_operations *);
> @@ -69,8 +69,8 @@ void svc_seq_show(struct seq_file *,
> const struct svc_stat *);
> #else
>
> -static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; }
> -static inline void rpc_proc_unregister(const char *p) {}
> +static inline struct proc_dir_entry *rpc_proc_register(struct net *, struct rpc_stat *s) { return NULL; }
> +static inline void rpc_proc_unregisterstruct net *, (const char *p) {}
> static inline void rpc_proc_zero(struct rpc_program *p) {}
>
> static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
> diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c
> index 80df89d..f0f6e7c 100644
> --- a/net/sunrpc/stats.c
> +++ b/net/sunrpc/stats.c
> @@ -213,28 +213,29 @@ EXPORT_SYMBOL_GPL(rpc_print_iostats);
> * Register/unregister RPC proc files
> */
> static inline struct proc_dir_entry *
> -do_register(const char *name, void *data, const struct file_operations *fops)
> +do_register(struct net *net, const char *name, void *data,
> + const struct file_operations *fops)
> {
> struct sunrpc_net *sn;
>
> dprintk("RPC: registering /proc/net/rpc/%s\n", name);
> - sn = net_generic(&init_net, sunrpc_net_id);
> + sn = net_generic(net, sunrpc_net_id);
> return proc_create_data(name, 0, sn->proc_net_rpc, fops, data);
> }
>
> struct proc_dir_entry *
> -rpc_proc_register(struct rpc_stat *statp)
> +rpc_proc_register(struct net *net, struct rpc_stat *statp)
> {
> - return do_register(statp->program->name, statp, &rpc_proc_fops);
> + return do_register(net, statp->program->name, statp, &rpc_proc_fops);
> }
> EXPORT_SYMBOL_GPL(rpc_proc_register);
>
> void
> -rpc_proc_unregister(const char *name)
> +rpc_proc_unregister(struct net *net, const char *name)
> {
> struct sunrpc_net *sn;
>
> - sn = net_generic(&init_net, sunrpc_net_id);
> + sn = net_generic(net, sunrpc_net_id);
> remove_proc_entry(name, sn->proc_net_rpc);
> }
> EXPORT_SYMBOL_GPL(rpc_proc_unregister);
> @@ -242,7 +243,7 @@ EXPORT_SYMBOL_GPL(rpc_proc_unregister);
> struct proc_dir_entry *
> svc_proc_register(struct svc_stat *statp, const struct file_operations *fops)
> {
> - return do_register(statp->program->pg_name, statp, fops);
> + return do_register(&init_net, statp->program->pg_name, statp, fops);
> }
> EXPORT_SYMBOL_GPL(svc_proc_register);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context
2012-01-30 18:29 ` Paul Gortmaker
@ 2012-01-30 20:49 ` Myklebust, Trond
0 siblings, 0 replies; 11+ messages in thread
From: Myklebust, Trond @ 2012-01-30 20:49 UTC (permalink / raw)
To: Paul Gortmaker
Cc: Stanislav Kinsbursky, rdunlap, linux-nfs, xemul, neilb, netdev,
linux-kernel, jbottomley, bfields, davem, devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1071 bytes --]
On Mon, 2012-01-30 at 13:29 -0500, Paul Gortmaker wrote:
> On Tue, Dec 6, 2011 at 8:42 AM, Stanislav Kinsbursky
> <skinsbursky@parallels.com> wrote:
> > This patch makes it possible to create NFS program entry ("/proc/net/rpc/nfs")
> > in passed network namespace context instead of hard-coded "init_net".
>
> Hi Trond,
>
> Is this patch going to be dropped and re-submitted? It has obvious
> typos that have been causing reported build failures[1] in linux-next
> for a week now. In addition to that, it has several whitespace errors
> (long lines, no space after comma, etc.) that I bet checkpatch.pl
> would have found, if it was used.
>
> Commit 4494c750240bab1bb83bd8f4d5a268663c37c9b3 in next-20120130.
I've applied Randy's fix to my tree. Sorry it took so long, but I was
travelling last week...
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-01-30 20:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-06 13:42 [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
2011-12-06 13:42 ` [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context Stanislav Kinsbursky
2011-12-06 21:33 ` J. Bruce Fields
2012-01-30 18:29 ` Paul Gortmaker
2012-01-30 20:49 ` Myklebust, Trond
2011-12-06 13:42 ` [PATCH 2/2] SUNRPC: register service " Stanislav Kinsbursky
2011-12-06 21:49 ` J. Bruce Fields
2012-01-20 11:34 ` [PATCH 0/2] SUNRPC: make /proc helpers network-namespace-aware Stanislav Kinsbursky
2012-01-20 14:30 ` bfields
2012-01-20 14:39 ` Trond Myklebust
2012-01-20 16:16 ` Stanislav Kinsbursky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).