[Devel] sunrpc: fix ve is dying check on -ENETUNREACH error upon connect

Submitted by Stanislav Kinsburskiy on March 22, 2017, 10:28 a.m.

Details

Message ID 20170322102844.25916.46866.stgit@localhost.localdomain
State New
Series "sunrpc: fix ve is dying check on -ENETUNREACH error upon connect"
Headers show

Commit Message

Stanislav Kinsburskiy March 22, 2017, 10:28 a.m.
This operations can be asynchonious. So, current VE is not the right one.
VE from transport network has to be taken instead.

Fixes commit 4ad21d242066afcb4f55000c308322c3bad98a2b

https://jira.sw.ru/browse/PSBM-62616

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 net/sunrpc/xprt.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 9277800..ac8bf61 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -778,7 +778,9 @@  static void xprt_connect_status(struct rpc_task *task)
 
 	switch (task->tk_status) {
 	case -ENETUNREACH:
-		if (current->task_ve->ve_netns == NULL) {
+		dprintk("RPC: ve_name(xprt->xprt_net->owner_ve): %s\n",
+				ve_name(xprt->xprt_net->owner_ve));
+		if (xprt->xprt_net->owner_ve->ve_netns == NULL) {
 			dprintk("RPC: %5u xprt_connect_status: error %d connecting to "
 					"server %s\n", task->tk_pid, -task->tk_status,
 					xprt->servername);

Comments

Dmitry Safonov March 22, 2017, 10:55 a.m.
On 03/22/2017 01:28 PM, Stanislav Kinsburskiy wrote:
> This operations can be asynchonious. So, current VE is not the right one.
> VE from transport network has to be taken instead.
>
> Fixes commit 4ad21d242066afcb4f55000c308322c3bad98a2b
>
> https://jira.sw.ru/browse/PSBM-62616
>
> Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>

Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>

> ---
>  net/sunrpc/xprt.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
> index 9277800..ac8bf61 100644
> --- a/net/sunrpc/xprt.c
> +++ b/net/sunrpc/xprt.c
> @@ -778,7 +778,9 @@ static void xprt_connect_status(struct rpc_task *task)
>
>  	switch (task->tk_status) {
>  	case -ENETUNREACH:
> -		if (current->task_ve->ve_netns == NULL) {
> +		dprintk("RPC: ve_name(xprt->xprt_net->owner_ve): %s\n",
> +				ve_name(xprt->xprt_net->owner_ve));
> +		if (xprt->xprt_net->owner_ve->ve_netns == NULL) {
>  			dprintk("RPC: %5u xprt_connect_status: error %d connecting to "
>  					"server %s\n", task->tk_pid, -task->tk_status,
>  					xprt->servername);
>