[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/13] nbd/server: do not use NBDReply struct
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/13] nbd/server: do not use NBDReply structure |
Date: |
Thu, 12 Oct 2017 17:03: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:
> NBDReply structure will be upgraded in future patches to handle both
> simple and structured replies and will be used only in the client
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> nbd/server.c | 36 +++++++++++++++---------------------
> 1 file changed, 15 insertions(+), 21 deletions(-)
>
> diff --git a/nbd/server.c b/nbd/server.c
> index 43ade30ba3..3878145f63 100644
> --- a/nbd/server.c
> +++ b/nbd/server.c
> @@ -1196,7 +1196,9 @@ static inline void set_be_simple_reply(NBDSimpleReply
> *reply, uint64_t error,
> stq_be_p(&reply->handle, handle);
> }
>
> -static int nbd_co_send_simple_reply(NBDRequestData *req, NBDReply *reply,
> +static int nbd_co_send_simple_reply(NBDRequestData *req,
> + uint64_t handle,
> + uint32_t error,
Feels a bit like a step backwards for the parameter list, but I'm not
opposed to the patch (it does make for some nice cleanup elsewhere).
> int len, Error **errp)
> {
> NBDClient *client = req->client;
> @@ -1205,10 +1207,10 @@ static int nbd_co_send_simple_reply(NBDRequestData
> *req, NBDReply *reply,
>
> g_assert(qemu_in_coroutine());
>
> - trace_nbd_co_send_simple_reply(reply->handle, reply->error, len);
> + trace_nbd_co_send_simple_reply(handle, error, len);
I had to tweak this to rebase on top of my churn on 4/13.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 00/13] nbd minimal structured read, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 05/13] nbd/server: do not use NBDReply structure, Vladimir Sementsov-Ogievskiy, 2017/10/12
- Re: [Qemu-devel] [PATCH v3 05/13] nbd/server: do not use NBDReply structure,
Eric Blake <=
- [Qemu-devel] [PATCH v3 03/13] nbd: rename some simple-request related objects to be _simple_, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 10/13] nbd/client: refactor nbd_receive_starttls, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 12/13] nbd/client: prepare nbd_receive_reply for structured reply, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 02/13] block/nbd-client: refactor nbd_co_receive_reply, Vladimir Sementsov-Ogievskiy, 2017/10/12
- [Qemu-devel] [PATCH v3 13/13] nbd: Minimal structured read for client, Vladimir Sementsov-Ogievskiy, 2017/10/12