2018-12-14 18:29:58

by Scott Mayhew

[permalink] [raw]
Subject: [PATCH] sunrpc: Be sure to clear XPRT_WRITE_SPACE when resetting the transport

Otherwise no RPC tasks will be able to lock the transport and will
therefore be unable to connect it either.

Signed-off-by: Scott Mayhew <[email protected]>
---
net/sunrpc/xprtsock.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 8a5e823e0b33..bbe06e3cc853 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1157,6 +1157,7 @@ static void xs_sock_reset_connection_flags(struct rpc_xprt *xprt)
smp_mb__before_atomic();
clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
clear_bit(XPRT_CLOSING, &xprt->state);
+ clear_bit(XPRT_WRITE_SPACE, &xprt->state);
xs_sock_reset_state_flags(xprt);
smp_mb__after_atomic();
}
--
2.17.1



2018-12-14 21:33:21

by Trond Myklebust

[permalink] [raw]
Subject: Re: [PATCH] sunrpc: Be sure to clear XPRT_WRITE_SPACE when resetting the transport

On Fri, 2018-12-14 at 13:29 -0500, Scott Mayhew wrote:
> Otherwise no RPC tasks will be able to lock the transport and will
> therefore be unable to connect it either.
>
> Signed-off-by: Scott Mayhew <[email protected]>
> ---
> net/sunrpc/xprtsock.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index 8a5e823e0b33..bbe06e3cc853 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -1157,6 +1157,7 @@ static void
> xs_sock_reset_connection_flags(struct rpc_xprt *xprt)
> smp_mb__before_atomic();
> clear_bit(XPRT_CLOSE_WAIT, &xprt->state);
> clear_bit(XPRT_CLOSING, &xprt->state);
> + clear_bit(XPRT_WRITE_SPACE, &xprt->state);
> xs_sock_reset_state_flags(xprt);
> smp_mb__after_atomic();
> }

Yep, this make sense. Thanks!

--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]