* [PATCH net-next v1 1/4] net: Convert rpcsec_gss_net_ops
2018-03-26 9:28 [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) Kirill Tkhai
@ 2018-03-26 9:28 ` Kirill Tkhai
2018-03-26 9:28 ` [PATCH net-next v1 2/4] net: Convert sunrpc_net_ops Kirill Tkhai
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kirill Tkhai @ 2018-03-26 9:28 UTC (permalink / raw)
To: davem, anna.schumaker, trond.myklebust, ktkhai, netdev
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 <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
---
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,
};
/*
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH net-next v1 2/4] net: Convert sunrpc_net_ops
2018-03-26 9:28 [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) Kirill Tkhai
2018-03-26 9:28 ` [PATCH net-next v1 1/4] net: Convert rpcsec_gss_net_ops Kirill Tkhai
@ 2018-03-26 9:28 ` Kirill Tkhai
2018-03-26 9:29 ` [PATCH net-next v1 3/4] net: Convert nfs4_dns_resolver_ops Kirill Tkhai
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Kirill Tkhai @ 2018-03-26 9:28 UTC (permalink / raw)
To: davem, anna.schumaker, trond.myklebust, ktkhai, netdev
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 <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH net-next v1 3/4] net: Convert nfs4_dns_resolver_ops
2018-03-26 9:28 [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) Kirill Tkhai
2018-03-26 9:28 ` [PATCH net-next v1 1/4] net: Convert rpcsec_gss_net_ops Kirill Tkhai
2018-03-26 9:28 ` [PATCH net-next v1 2/4] net: Convert sunrpc_net_ops Kirill Tkhai
@ 2018-03-26 9:29 ` Kirill Tkhai
2018-03-26 9:29 ` [PATCH net-next v1 4/4] net: Convert nfs4blocklayout_net_ops Kirill Tkhai
2018-03-26 17:03 ` [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Kirill Tkhai @ 2018-03-26 9:29 UTC (permalink / raw)
To: davem, anna.schumaker, trond.myklebust, ktkhai, netdev
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 <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
---
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,
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH net-next v1 4/4] net: Convert nfs4blocklayout_net_ops
2018-03-26 9:28 [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) Kirill Tkhai
` (2 preceding siblings ...)
2018-03-26 9:29 ` [PATCH net-next v1 3/4] net: Convert nfs4_dns_resolver_ops Kirill Tkhai
@ 2018-03-26 9:29 ` Kirill Tkhai
2018-03-26 17:03 ` [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Kirill Tkhai @ 2018-03-26 9:29 UTC (permalink / raw)
To: davem, anna.schumaker, trond.myklebust, ktkhai, netdev
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 <ktkhai@virtuozzo.com>
Acked-by: Anna Schumaker <Anna.Schumaker@netapp.com>
---
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)
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1)
2018-03-26 9:28 [PATCH net-next v1 0/4] Converting pernet_operations (part #7.1) Kirill Tkhai
` (3 preceding siblings ...)
2018-03-26 9:29 ` [PATCH net-next v1 4/4] net: Convert nfs4blocklayout_net_ops Kirill Tkhai
@ 2018-03-26 17:03 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-03-26 17:03 UTC (permalink / raw)
To: ktkhai; +Cc: anna.schumaker, trond.myklebust, netdev
From: Kirill Tkhai <ktkhai@virtuozzo.com>
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.
^ permalink raw reply [flat|nested] 6+ messages in thread