qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: mreitz@redhat.com, kwolf@redhat.com, pbonzini@redhat.com, den@openvz.org
Subject: Re: [Qemu-devel] [PATCH v3 3/3] block/nbd-client: nbd_co_send_request: fix return code
Date: Wed, 20 Sep 2017 10:41:26 -0500	[thread overview]
Message-ID: <34298944-031c-a19a-fd69-c28441a357a2@redhat.com> (raw)
In-Reply-To: <20170920124507.18841-4-vsementsov@virtuozzo.com>

[-- Attachment #1: Type: text/plain, Size: 978 bytes --]

On 09/20/2017 07:45 AM, Vladimir Sementsov-Ogievskiy wrote:
> It's incorrect to return success rc >= 0 if we skip qio_channel_writev_all()
> call due to s->quit.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>  block/nbd-client.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block/nbd-client.c b/block/nbd-client.c
> index 486bfff9f7..9d1e154feb 100644
> --- a/block/nbd-client.c
> +++ b/block/nbd-client.c
> @@ -161,6 +161,8 @@ static int nbd_co_send_request(BlockDriverState *bs,
>                                         NULL) < 0) {
>                  rc = -EIO;
>              }
> +        } else if (rc >= 0) {
> +            rc = -EIO;
>          }
>          qio_channel_set_cork(s->ioc, false);
>      } else {
> 

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-09-20 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20 12:45 [Qemu-devel] [PATCH v3 0/3] nbd client refactoring and fixing Vladimir Sementsov-Ogievskiy
2017-09-20 12:45 ` [Qemu-devel] [PATCH v3 1/3] block/nbd-client: refactor nbd_co_receive_reply Vladimir Sementsov-Ogievskiy
2017-09-20 12:45 ` [Qemu-devel] [PATCH v3 2/3] block/nbd-client: simplify check in nbd_co_receive_reply Vladimir Sementsov-Ogievskiy
2017-09-20 15:39   ` Eric Blake
2017-09-20 12:45 ` [Qemu-devel] [PATCH v3 3/3] block/nbd-client: nbd_co_send_request: fix return code Vladimir Sementsov-Ogievskiy
2017-09-20 15:41   ` Eric Blake [this message]
2017-09-20 17:22 ` [Qemu-devel] [PATCH v3 0/3] nbd client refactoring and fixing Eric Blake
2017-09-21  7:48   ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34298944-031c-a19a-fd69-c28441a357a2@redhat.com \
    --to=eblake@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).