[PATCH net-next v1 0/4] Converting pernet_operations (part #7.1)

STALE3131d

6 messages, 2 authors, 2018-03-26 · open the first message on its own page

[PATCH net-next v1 0/4] Converting pernet_operations (part #7.1)

From: Kirill Tkhai <hidden>
Date: 2018-03-26 09:28:44

Hi,

this is a resending of the 4 patches from path #7.

Anna kindly reviewed them and suggested to take the patches
through net tree, since there is pernet_operations::async only
in net-next.git.

There is Anna's acks on every header, the rest of patch
has no changes.

Thanks,
Kirill
---

Kirill Tkhai (4):
      net: Convert rpcsec_gss_net_ops
      net: Convert sunrpc_net_ops
      net: Convert nfs4_dns_resolver_ops
      net: Convert nfs4blocklayout_net_ops


 fs/nfs/blocklayout/rpc_pipefs.c |    1 +
 fs/nfs/dns_resolve.c            |    1 +
 net/sunrpc/auth_gss/auth_gss.c  |    1 +
 net/sunrpc/sunrpc_syms.c        |    1 +
 4 files changed, 4 insertions(+)

[PATCH net-next v1 1/4] net: Convert rpcsec_gss_net_ops

From: Kirill Tkhai <hidden>
Date: 2018-03-26 09:28:53

These pernet_operations initialize and destroy sunrpc_net_id
refered per-net items. Only used global list is cache_list,
and accesses already serialized.

sunrpc_destroy_cache_detail() check for list_empty() without
cache_list_lock, but when it's called from unregister_pernet_subsys(),
there can't be callers in parallel, so we won't miss list_empty()
in this case.

Signed-off-by: Kirill Tkhai <redacted>
Acked-by: Anna Schumaker <redacted>
---
 net/sunrpc/auth_gss/auth_gss.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 9463af4b32e8..44f939cb6bc8 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -2063,6 +2063,7 @@ static __net_exit void rpcsec_gss_exit_net(struct net *net)
 static struct pernet_operations rpcsec_gss_net_ops = {
 	.init = rpcsec_gss_init_net,
 	.exit = rpcsec_gss_exit_net,
+	.async = true,
 };
 
 /*

[PATCH net-next v1 2/4] net: Convert sunrpc_net_ops

From: Kirill Tkhai <hidden>
Date: 2018-03-26 09:29:01

These pernet_operations look similar to rpcsec_gss_net_ops,
they just create and destroy another caches. So, they also
can be async.

Signed-off-by: Kirill Tkhai <redacted>
Acked-by: Anna Schumaker <redacted>
---
 net/sunrpc/sunrpc_syms.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index 56f9eff74150..68287e921847 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -79,6 +79,7 @@ static struct pernet_operations sunrpc_net_ops = {
 	.exit = sunrpc_exit_net,
 	.id = &sunrpc_net_id,
 	.size = sizeof(struct sunrpc_net),
+	.async = true,
 };
 
 static int __init

[PATCH net-next v1 3/4] net: Convert nfs4_dns_resolver_ops

From: Kirill Tkhai <hidden>
Date: 2018-03-26 09:29:10

These pernet_operations look similar to rpcsec_gss_net_ops,
they just create and destroy another cache. Also they create
and destroy directory. So, they also look safe to be async.

Signed-off-by: Kirill Tkhai <redacted>
Acked-by: Anna Schumaker <redacted>
---
 fs/nfs/dns_resolve.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
index 060c658eab66..e90bd69ab653 100644
--- a/fs/nfs/dns_resolve.c
+++ b/fs/nfs/dns_resolve.c
@@ -410,6 +410,7 @@ static void nfs4_dns_net_exit(struct net *net)
 static struct pernet_operations nfs4_dns_resolver_ops = {
 	.init = nfs4_dns_net_init,
 	.exit = nfs4_dns_net_exit,
+	.async = true,
 };
 
 static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event,

[PATCH net-next v1 4/4] net: Convert nfs4blocklayout_net_ops

From: Kirill Tkhai <hidden>
Date: 2018-03-26 09:29:17

These pernet_operations create and destroy per-net pipe
and dentry, and they seem safe to be marked as async.

Signed-off-by: Kirill Tkhai <redacted>
Acked-by: Anna Schumaker <redacted>
---
 fs/nfs/blocklayout/rpc_pipefs.c |    1 +
 1 file changed, 1 insertion(+)
diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
index 9fb067a6f7e0..ef9fa111b009 100644
--- a/fs/nfs/blocklayout/rpc_pipefs.c
+++ b/fs/nfs/blocklayout/rpc_pipefs.c
@@ -261,6 +261,7 @@ static void nfs4blocklayout_net_exit(struct net *net)
 static struct pernet_operations nfs4blocklayout_net_ops = {
 	.init = nfs4blocklayout_net_init,
 	.exit = nfs4blocklayout_net_exit,
+	.async = true,
 };
 
 int __init bl_init_pipefs(void)

Re: [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1)

From: David Miller <davem@davemloft.net>
Date: 2018-03-26 17:03:58

From: Kirill Tkhai <redacted>
Date: Mon, 26 Mar 2018 12:28:39 +0300
this is a resending of the 4 patches from path #7.

Anna kindly reviewed them and suggested to take the patches
through net tree, since there is pernet_operations::async only
in net-next.git.

There is Anna's acks on every header, the rest of patch
has no changes.
Thanks for respinning this, it helps me a lot.

Series applied, thanks again.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help