On 7/31/18 12:30 PM, Vladimir Sementsov-Ogievskiy wrote:
> Keep all connection code in one file, to be able to implement reconnect
> in further patches.
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
> ---
>  block/nbd-client.h |  2 +-
>  block/nbd-client.c | 37 +++++++++++++++++++++++++++++++++++--
>  block/nbd.c        | 40 ++--------------------------------------
>  3 files changed, 38 insertions(+), 41 deletions(-)
> 

> @@ -1001,12 +1033,14 @@ int nbd_client_init(BlockDriverState *bs,
>      g_free(client->info.x_dirty_bitmap);
>      if (ret < 0) {
>          logout("Failed to negotiate with the NBD server\n");
> +        object_unref(OBJECT(sioc));
>          return ret;
>      }
>      if (client->info.flags & NBD_FLAG_READ_ONLY &&
>          !bdrv_is_read_only(bs)) {
>          error_setg(errp,
>                     "request for write access conflicts with read-only 
> export");
> +        object_unref(OBJECT(sioc));
>          return -EACCES;
>      }

Conflicts with changes committed in the meantime. I think I can resolve
the conflicts, but you may want to post a v5.

The patch itself looks reasonable;
Reviewed-by: Eric Blake <[email protected]>

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to