[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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v3 13/13] nbd: Minimal structured read for client, (continued)
- [Qemu-devel] [PATCH v3 09/13] nbd: Minimal structured read for server, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 11/13] nbd: share some nbd entities to be reused in block/nbd-client.c, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 07/13] nbd-server: simplify reply transmission, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 04/13] nbd/server: structurize simple reply header sending, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 01/13] block/nbd-client: assert qiov len once in nbd_co_request, Vladimir Sementsov-Ogievskiy, 2017/10/12