Skip to contentSkip to conversation

SUNRPC: make /proc helpers network-namespace-aware

PATCH In review Stanislav Kinsbursky 4 participants 11 messages Dec 6, 2011 – Jan 30, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover SUNRPC: make /proc helpers network-namespace-aware

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(-)
#1 lore raw

PATCH 1/2 SUNRPC: register RPC stats /proc entries in passed network namespace context

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".

---
 fs/nfs/inode.c               |    6 +++---
 include/linux/sunrpc/stats.h |    8 ++++----
 net/sunrpc/stats.c           |   15 ++++++++-------
 3 files changed, 15 insertions(+), 14 deletions(-)
fs/nfs/inode.c +3 -3
index 98b2508..5cad6c5 100644
@@ -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();
include/linux/sunrpc/stats.h +4 -4
index 680471d..f625b57 100644
@@ -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,
net/sunrpc/stats.c +8 -7
index 80df89d..f0f6e7c 100644
@@ -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);
 
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context

Quoted 2 lines · Stanislav Kinsbursky

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.

--b.

Quoted 107 lines
---
 fs/nfs/inode.c               |    6 +++---
 include/linux/sunrpc/stats.h |    8 ++++----
 net/sunrpc/stats.c           |   15 ++++++++-------
 3 files changed, 15 insertions(+), 14 deletions(-)
fs/nfs/inode.c +3 -3
index 98b2508..5cad6c5 100644
@@ -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();
include/linux/sunrpc/stats.h +4 -4
index 680471d..f625b57 100644
@@ -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,
net/sunrpc/stats.c +7 -6
index 80df89d..f0f6e7c 100644
@@ -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);

net/sunrpc/stats.c EXPORT_SYMBOL_GPL(rpc_proc_unregister); · line 249

Quoted 8 lines
net/sunrpc/stats.c +1 -1
@@ -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-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context

In reply to Stanislav Kinsbursky
Quoted 2 lines · Stanislav Kinsbursky

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

Quoted 115 lines

---
 fs/nfs/inode.c               |    6 +++--- include/linux/sunrpc/stats.h |    8 ++++---- net/sunrpc/stats.c           |   15 ++++++++-------

 3 files changed, 15 insertions(+), 14 deletions(-)
fs/nfs/inode.c +1 -1
index 98b2508..5cad6c5 100644
@@ -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:

fs/nfs/inode.c +1 -1
@@ -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();
include/linux/sunrpc/stats.h +4 -4
index 680471d..f625b57 100644
@@ -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,
net/sunrpc/stats.c +0 -0
index 80df89d..f0f6e7c 100644
@@ -213,28 +213,29 @@ EXPORT_SYMBOL_GPL(rpc_print_iostats);
  * Register/unregister RPC proc files
  */

 static inline struct proc_dir_entry *

net/sunrpc/stats.c +2 -1
-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 *

net/sunrpc/stats.c +1 -1
-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

net/sunrpc/stats.c +1 -1
-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);

net/sunrpc/stats.c +0 -0
@@ -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);

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Re: [PATCH 1/2] SUNRPC: register RPC stats /proc entries in passed network namespace context

T24gTW9uLCAyMDEyLTAxLTMwIGF0IDEzOjI5IC0wNTAwLCBQYXVsIEdvcnRtYWtlciB3cm90ZToN Cj4gT24gVHVlLCBEZWMgNiwgMjAxMSBhdCA4OjQyIEFNLCBTdGFuaXNsYXYgS2luc2J1cnNreQ0K PiA8c2tpbnNidXJza3lAcGFyYWxsZWxzLmNvbT4gd3JvdGU6DQo+ID4gVGhpcyBwYXRjaCBtYWtl cyBpdCBwb3NzaWJsZSB0byBjcmVhdGUgTkZTIHByb2dyYW0gZW50cnkgKCIvcHJvYy9uZXQvcnBj L25mcyIpDQo+ID4gaW4gcGFzc2VkIG5ldHdvcmsgbmFtZXNwYWNlIGNvbnRleHQgaW5zdGVhZCBv ZiBoYXJkLWNvZGVkICJpbml0X25ldCIuDQo+IA0KPiBIaSBUcm9uZCwNCj4gDQo+IElzIHRoaXMg cGF0Y2ggZ29pbmcgdG8gYmUgZHJvcHBlZCBhbmQgcmUtc3VibWl0dGVkPyAgIEl0IGhhcyBvYnZp b3VzDQo+IHR5cG9zIHRoYXQgaGF2ZSBiZWVuIGNhdXNpbmcgcmVwb3J0ZWQgYnVpbGQgZmFpbHVy ZXNbMV0gaW4gbGludXgtbmV4dA0KPiBmb3IgYSB3ZWVrIG5vdy4gICBJbiBhZGRpdGlvbiB0byB0 aGF0LCBpdCBoYXMgc2V2ZXJhbCB3aGl0ZXNwYWNlIGVycm9ycw0KPiAobG9uZyBsaW5lcywgbm8g c3BhY2UgYWZ0ZXIgY29tbWEsIGV0Yy4pIHRoYXQgSSBiZXQgY2hlY2twYXRjaC5wbA0KPiB3b3Vs ZCBoYXZlIGZvdW5kLCBpZiBpdCB3YXMgdXNlZC4NCj4gDQo+IENvbW1pdCA0NDk0Yzc1MDI0MGJh YjFiYjgzYmQ4ZjRkNWEyNjg2NjNjMzdjOWIzIGluIG5leHQtMjAxMjAxMzAuDQoNCkkndmUgYXBw bGllZCBSYW5keSdzIGZpeCB0byBteSB0cmVlLiBTb3JyeSBpdCB0b29rIHNvIGxvbmcsIGJ1dCBJ IHdhcw0KdHJhdmVsbGluZyBsYXN0IHdlZWsuLi4NCg0KLS0gDQpUcm9uZCBNeWtsZWJ1c3QNCkxp bnV4IE5GUyBjbGllbnQgbWFpbnRhaW5lcg0KDQpOZXRBcHANClRyb25kLk15a2xlYnVzdEBuZXRh cHAuY29tDQp3d3cubmV0YXBwLmNvbQ0KDQo=

#5 lore raw

PATCH 2/2 SUNRPC: register service stats /proc entries in passed network namespace context

In reply to Stanislav Kinsbursky

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".

---
 fs/nfsd/stats.c              |    5 +++--
 include/linux/sunrpc/stats.h |    8 ++++----
 net/sunrpc/stats.c           |    8 ++++----
 3 files changed, 11 insertions(+), 10 deletions(-)
fs/nfsd/stats.c +3 -2
index a2e2402..6d4521f 100644
@@ -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");
 }
include/linux/sunrpc/stats.h +4 -4
index f625b57..4720b12 100644
@@ -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) {}
net/sunrpc/stats.c +4 -4
index f0f6e7c..3c4f688 100644
@@ -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);
Acked-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] SUNRPC: register service stats /proc entries in passed network namespace context

Quoted 2 lines · Stanislav Kinsbursky

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".

Or I can just apply it. I'll assume it's going through Trond's tree unless I hear otherwise.

--b.

Quoted 81 lines
---
 fs/nfsd/stats.c              |    5 +++--
 include/linux/sunrpc/stats.h |    8 ++++----
 net/sunrpc/stats.c           |    8 ++++----
 3 files changed, 11 insertions(+), 10 deletions(-)
fs/nfsd/stats.c +3 -2
index a2e2402..6d4521f 100644
@@ -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");
 }
include/linux/sunrpc/stats.h +4 -4
index f625b57..4720b12 100644
@@ -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) {}
net/sunrpc/stats.c +2 -2
index f0f6e7c..3c4f688 100644
@@ -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

net/sunrpc/stats.c rpc_proc_unregister(struct net *net, const char *name) · line 258

Quoted 10 lines
net/sunrpc/stats.c +2 -2
-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);

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 3 lines · Stanislav Kinsbursky

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw
Quoted 8 lines · On Fri, 2012-01-20 at 09:30 -0500, [email protected] wrote:
Quoted 3 lines · Stanislav Kinsbursky

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.

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com
#10 lore raw

20.01.2012 18:39, Trond Myklebust пишет:

Quoted 6 lines · On Fri, 2012-01-20 at 09:30 -0500, [email protected] wrote:
Quoted 5 lines · Stanislav Kinsbursky
Quoted 3 lines

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?

Quoted 7 lines
Quoted 3 lines

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.

Signature · 2 lines
Best regards,
Stanislav Kinsbursky