nbd/client: Pass mode through to nbd_send_request
commit4451beb88fd67cc5ae63b15bb35a903a5c977ac0
authorEric Blake <eblake@redhat.com>
Tue, 6 Jun 2023 20:56:38 +0000 (6 15:56 -0500)
committerEric Blake <eblake@redhat.com>
Thu, 10 Aug 2023 14:44:01 +0000 (10 09:44 -0500)
tree2a752a7e5cfa0a6f21bf559110f66ed1914eba03
parent7cce0254d470033289676982b1ccee693677e68e
nbd/client: Pass mode through to nbd_send_request

Once the 64-bit headers extension is enabled, the data layout we send
over the wire for a client request depends on the mode negotiated with
the server.  Rather than adding a parameter to nbd_send_request, we
can add a member to struct NBDRequest, since it already does not
reflect on-wire format.  Some callers initialize it directly; many
others rely on a common initialization point during
nbd_co_send_request().  At this point, there is no semantic change.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---

v5: R-b added
v4: new patch, based on ideas in v3 4/14, but by modifying NBDRequest
instead of adding a parameter
block/nbd.c
include/block/nbd.h
nbd/client.c