* [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook
[not found] <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com>
@ 2017-11-06 13:22 ` Vasily Averin
2017-11-06 20:02 ` J. Bruce Fields
2017-11-09 15:06 ` J. Bruce Fields
2017-11-06 13:23 ` [PATCH v3 02/21] lockd: added cleanup checks " Vasily Averin
` (3 subsequent siblings)
4 siblings, 2 replies; 8+ messages in thread
From: Vasily Averin @ 2017-11-06 13:22 UTC (permalink / raw)
To: netdev; +Cc: J. Bruce Fields, Jeff Layton, linux-nfs@vger.kernel.org
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/nfs_common/grace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
index 420d3a0..1bd6599 100644
--- a/fs/nfs_common/grace.c
+++ b/fs/nfs_common/grace.c
@@ -104,7 +104,9 @@ grace_exit_net(struct net *net)
{
struct list_head *grace_list = net_generic(net, grace_net_id);
- BUG_ON(!list_empty(grace_list));
+ WARN_ONCE(!list_empty(grace_list),
+ "net %x %s: grace_list is not empty\n",
+ net->ns.inum, __func__);
}
static struct pernet_operations grace_net_ops = {
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook
2017-11-06 13:22 ` [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook Vasily Averin
@ 2017-11-06 20:02 ` J. Bruce Fields
2017-11-09 15:06 ` J. Bruce Fields
1 sibling, 0 replies; 8+ messages in thread
From: J. Bruce Fields @ 2017-11-06 20:02 UTC (permalink / raw)
To: Vasily Averin; +Cc: netdev, Jeff Layton, linux-nfs@vger.kernel.org
I'm assuming you want me to apply this (and the following lockd patch),
but I'm not clear why this is part of a bigger series going to netdev.
--b.
On Mon, Nov 06, 2017 at 04:22:48PM +0300, Vasily Averin wrote:
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
> ---
> fs/nfs_common/grace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
> index 420d3a0..1bd6599 100644
> --- a/fs/nfs_common/grace.c
> +++ b/fs/nfs_common/grace.c
> @@ -104,7 +104,9 @@ grace_exit_net(struct net *net)
> {
> struct list_head *grace_list = net_generic(net, grace_net_id);
>
> - BUG_ON(!list_empty(grace_list));
> + WARN_ONCE(!list_empty(grace_list),
> + "net %x %s: grace_list is not empty\n",
> + net->ns.inum, __func__);
> }
>
> static struct pernet_operations grace_net_ops = {
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook
2017-11-06 13:22 ` [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook Vasily Averin
2017-11-06 20:02 ` J. Bruce Fields
@ 2017-11-09 15:06 ` J. Bruce Fields
1 sibling, 0 replies; 8+ messages in thread
From: J. Bruce Fields @ 2017-11-09 15:06 UTC (permalink / raw)
To: Vasily Averin; +Cc: netdev, Jeff Layton, linux-nfs@vger.kernel.org
Applied for 4.15, thanks.--b.
On Mon, Nov 06, 2017 at 04:22:48PM +0300, Vasily Averin wrote:
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
> ---
> fs/nfs_common/grace.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c
> index 420d3a0..1bd6599 100644
> --- a/fs/nfs_common/grace.c
> +++ b/fs/nfs_common/grace.c
> @@ -104,7 +104,9 @@ grace_exit_net(struct net *net)
> {
> struct list_head *grace_list = net_generic(net, grace_net_id);
>
> - BUG_ON(!list_empty(grace_list));
> + WARN_ONCE(!list_empty(grace_list),
> + "net %x %s: grace_list is not empty\n",
> + net->ns.inum, __func__);
> }
>
> static struct pernet_operations grace_net_ops = {
> --
> 2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 02/21] lockd: added cleanup checks in exit_net hook
[not found] <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com>
2017-11-06 13:22 ` [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook Vasily Averin
@ 2017-11-06 13:23 ` Vasily Averin
2017-11-09 15:06 ` J. Bruce Fields
2017-11-06 13:24 ` [PATCH v3 07/21] nfs4blocklayout: exit_net cleanup check added Vasily Averin
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Vasily Averin @ 2017-11-06 13:23 UTC (permalink / raw)
To: netdev; +Cc: J. Bruce Fields, Jeff Layton, linux-nfs@vger.kernel.org
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/lockd/svc.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 809cbcc..2a48558 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -690,6 +690,17 @@ static int lockd_init_net(struct net *net)
static void lockd_exit_net(struct net *net)
{
+ struct lockd_net *ln = net_generic(net, lockd_net_id);
+
+ WARN_ONCE(!list_empty(&ln->lockd_manager.list),
+ "net %x %s: lockd_manager.list is not empty\n",
+ net->ns.inum, __func__);
+ WARN_ONCE(!list_empty(&ln->nsm_handles),
+ "net %x %s: nsm_handles list is not empty\n",
+ net->ns.inum, __func__);
+ WARN_ONCE(delayed_work_pending(&ln->grace_period_end),
+ "net %x %s: grace_period_end was not cancelled\n",
+ net->ns.inum, __func__);
}
static struct pernet_operations lockd_net_ops = {
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 02/21] lockd: added cleanup checks in exit_net hook
2017-11-06 13:23 ` [PATCH v3 02/21] lockd: added cleanup checks " Vasily Averin
@ 2017-11-09 15:06 ` J. Bruce Fields
0 siblings, 0 replies; 8+ messages in thread
From: J. Bruce Fields @ 2017-11-09 15:06 UTC (permalink / raw)
To: Vasily Averin; +Cc: netdev, Jeff Layton, linux-nfs@vger.kernel.org
Applied.--b.
On Mon, Nov 06, 2017 at 04:23:24PM +0300, Vasily Averin wrote:
> Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
> ---
> fs/lockd/svc.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index 809cbcc..2a48558 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -690,6 +690,17 @@ static int lockd_init_net(struct net *net)
>
> static void lockd_exit_net(struct net *net)
> {
> + struct lockd_net *ln = net_generic(net, lockd_net_id);
> +
> + WARN_ONCE(!list_empty(&ln->lockd_manager.list),
> + "net %x %s: lockd_manager.list is not empty\n",
> + net->ns.inum, __func__);
> + WARN_ONCE(!list_empty(&ln->nsm_handles),
> + "net %x %s: nsm_handles list is not empty\n",
> + net->ns.inum, __func__);
> + WARN_ONCE(delayed_work_pending(&ln->grace_period_end),
> + "net %x %s: grace_period_end was not cancelled\n",
> + net->ns.inum, __func__);
> }
>
> static struct pernet_operations lockd_net_ops = {
> --
> 2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 07/21] nfs4blocklayout: exit_net cleanup check added
[not found] <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com>
2017-11-06 13:22 ` [PATCH v3 01/21] grace: replace BUG_ON by WARN_ONCE in exit_net hook Vasily Averin
2017-11-06 13:23 ` [PATCH v3 02/21] lockd: added cleanup checks " Vasily Averin
@ 2017-11-06 13:24 ` Vasily Averin
2017-11-06 13:24 ` [PATCH v3 08/21] nfs client: " Vasily Averin
2017-11-06 13:26 ` [PATCH v3 21/21] sunrpc: " Vasily Averin
4 siblings, 0 replies; 8+ messages in thread
From: Vasily Averin @ 2017-11-06 13:24 UTC (permalink / raw)
To: netdev
Cc: J. Bruce Fields, Jeff Layton, linux-nfs, Trond Myklebust,
Anna Schumaker
Be sure that bl_wq wait queue initialized in net_init hook
is not used anymore.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/nfs/blocklayout/rpc_pipefs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/nfs/blocklayout/rpc_pipefs.c b/fs/nfs/blocklayout/rpc_pipefs.c
index 9fb067a6..8c3941b 100644
--- a/fs/nfs/blocklayout/rpc_pipefs.c
+++ b/fs/nfs/blocklayout/rpc_pipefs.c
@@ -256,6 +256,9 @@ static void nfs4blocklayout_net_exit(struct net *net)
nfs4blocklayout_unregister_net(net, nn->bl_device_pipe);
rpc_destroy_pipe_data(nn->bl_device_pipe);
nn->bl_device_pipe = NULL;
+ WARN_ONCE(!list_empty(&nn->bl_wq.head),
+ "net %x %s: bl_wq head is not empty\n",
+ net->ns.inum, __func__);
}
static struct pernet_operations nfs4blocklayout_net_ops = {
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v3 08/21] nfs client: exit_net cleanup check added
[not found] <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com>
` (2 preceding siblings ...)
2017-11-06 13:24 ` [PATCH v3 07/21] nfs4blocklayout: exit_net cleanup check added Vasily Averin
@ 2017-11-06 13:24 ` Vasily Averin
2017-11-06 13:26 ` [PATCH v3 21/21] sunrpc: " Vasily Averin
4 siblings, 0 replies; 8+ messages in thread
From: Vasily Averin @ 2017-11-06 13:24 UTC (permalink / raw)
To: netdev; +Cc: linux-nfs, Trond Myklebust, Anna Schumaker
Be sure that nfs_client_list and nfs_volume_list lists initialized
in net_init hook were return to initial state in net_exit hook.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
fs/nfs/client.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 22880ef..3966c98 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -204,6 +204,10 @@ void nfs_cleanup_cb_ident_idr(struct net *net)
struct nfs_net *nn = net_generic(net, nfs_net_id);
idr_destroy(&nn->cb_ident_idr);
+ WARN_ONCE(!list_empty(&nn->nfs_client_list),
+ "net %x exit: nfs_client_list is not empty\n", net->ns.inum);
+ WARN_ONCE(!list_empty(&nn->nfs_volume_list),
+ "net %x exit: nfs_volume_list is not empty\n", net->ns.inum);
}
/* nfs_client_lock held */
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH v3 21/21] sunrpc: exit_net cleanup check added
[not found] <4fdc4264-e338-6ee8-a662-7d98b45733a1@virtuozzo.com>
` (3 preceding siblings ...)
2017-11-06 13:24 ` [PATCH v3 08/21] nfs client: " Vasily Averin
@ 2017-11-06 13:26 ` Vasily Averin
4 siblings, 0 replies; 8+ messages in thread
From: Vasily Averin @ 2017-11-06 13:26 UTC (permalink / raw)
To: netdev
Cc: J. Bruce Fields, Jeff Layton, linux-nfs, Trond Myklebust,
Anna Schumaker
Be sure that all_clients list initialized in net_init hook was return
to initial state.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
net/sunrpc/sunrpc_syms.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index c73de18..3ee6d8e 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -65,10 +65,15 @@ static __net_init int sunrpc_init_net(struct net *net)
static __net_exit void sunrpc_exit_net(struct net *net)
{
+ struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);
+
rpc_pipefs_exit_net(net);
unix_gid_cache_destroy(net);
ip_map_cache_destroy(net);
rpc_proc_exit(net);
+ WARN_ONCE(!list_empty(&sn->all_clients),
+ "net %x %s: all_clients list is not empty\n",
+ net->ns.inum, __func__);
}
static struct pernet_operations sunrpc_net_ops = {
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread