qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 12/19] nbd/common: nbd_wr_syncv handle QIO_CHANN


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 12/19] nbd/common: nbd_wr_syncv handle QIO_CHANNEL_ERR_EPIPE
Date: Thu, 1 Jun 2017 17:13:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 05/30/2017 09:30 AM, Vladimir Sementsov-Ogievskiy wrote:
> Return EPIPE in case of QIO_CHANNEL_ERR_EPIPE, we will need it to
> improve error path in nbd server.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
>  nbd/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I agree with Daniel's assessment that we probably aren't doing things
right in the previous patch, and therefore probably don't need this one.

> 
> diff --git a/nbd/common.c b/nbd/common.c
> index e520aae741..88e0297fb2 100644
> --- a/nbd/common.c
> +++ b/nbd/common.c
> @@ -52,7 +52,7 @@ ssize_t nbd_wr_syncv(QIOChannel *ioc,
>              continue;
>          }
>          if (len < 0) {
> -            done = -EIO;
> +            done = len == QIO_CHANNEL_ERR_EPIPE ? -EPIPE : -EIO;
>              goto cleanup;
>          }
>  
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]