kio: Stop always breaking connection in pcs_sockio_send() in case of EAGAIN.

Submitted by Kirill Tkhai on May 17, 2018, 8:51 a.m.

Details

Message ID 152654702636.25337.14731246674399117090.stgit@localhost.localdomain
State New
Series "kio: Stop always breaking connection in pcs_sockio_send() in case of EAGAIN."
Headers show

Commit Message

Kirill Tkhai May 17, 2018, 8:51 a.m.
We should just return and not fall into sio_abort(sio, PCS_ERR_NET_ABORT),
in case EGAIN. The right logic is to we break connection in with
PCS_ERR_WRITE_TIMEOUT, in case of timeout is expired.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_sock_io.c |    1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c
index 6936dede5b96..29cd199dffa0 100644
--- a/fs/fuse/kio/pcs/pcs_sock_io.c
+++ b/fs/fuse/kio/pcs/pcs_sock_io.c
@@ -312,6 +312,7 @@  static void pcs_sockio_send(struct pcs_sockio *sio)
 					unsigned long timeout = msg->start_time + sio->send_timeout;
 					if (time_is_before_jiffies(timeout))
 						sio_abort(sio, PCS_ERR_WRITE_TIMEOUT);
+					return;
 				}
 				sio_abort(sio, PCS_ERR_NET_ABORT);
 				return;

Comments

Kirill Tkhai May 17, 2018, 9 a.m.
VSTOR-9848

On 17.05.2018 11:51, Kirill Tkhai wrote:
> We should just return and not fall into sio_abort(sio, PCS_ERR_NET_ABORT),
> in case EGAIN. The right logic is to we break connection in with
> PCS_ERR_WRITE_TIMEOUT, in case of timeout is expired.
> 
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  fs/fuse/kio/pcs/pcs_sock_io.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c
> index 6936dede5b96..29cd199dffa0 100644
> --- a/fs/fuse/kio/pcs/pcs_sock_io.c
> +++ b/fs/fuse/kio/pcs/pcs_sock_io.c
> @@ -312,6 +312,7 @@ static void pcs_sockio_send(struct pcs_sockio *sio)
>  					unsigned long timeout = msg->start_time + sio->send_timeout;
>  					if (time_is_before_jiffies(timeout))
>  						sio_abort(sio, PCS_ERR_WRITE_TIMEOUT);
> +					return;
>  				}
>  				sio_abort(sio, PCS_ERR_NET_ABORT);
>  				return;
>