qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 11/13] nbd: share some nbd entities to be reu


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 11/13] nbd: share some nbd entities to be reused in block/nbd-client.c
Date: Fri, 13 Oct 2017 17:34:26 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/12/2017 04:53 AM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
>  include/block/nbd.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  nbd/nbd-internal.h  | 25 -------------------------
>  nbd/client.c        | 32 --------------------------------
>  3 files changed, 48 insertions(+), 57 deletions(-)
> 

By the end of your series, I still don't see any use of

> +++ b/include/block/nbd.h

> @@ -235,4 +272,15 @@ void nbd_client_put(NBDClient *client);
>  void nbd_server_start(SocketAddress *addr, const char *tls_creds,
>                        Error **errp);
>  
> +/* nbd_read
> + * Reads @size bytes from @ioc. Returns 0 on success.
> + */
> +static inline int nbd_read(QIOChannel *ioc, void *buffer, size_t size,
> +                           Error **errp)
> +{
> +    return qio_channel_read_all(ioc, buffer, size, errp) < 0 ? -EIO : 0;
> +}
> +
> +int nbd_drop(QIOChannel *ioc, size_t size, Error **errp);

either of these functions in block/nbd-client.c.  I think that's a good
thing (we refactored it so that nbd/client.c is doing ALL the reading
from the wire, and block/nbd-client.c is relying on nbd/client.c to do
the work), but it means this part of the patch is no longer necessary,
unless I'm missing something.

-- 
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]