From efdc0c103d7919e5cabfc0b12a5699c1f8e482db Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 8 Nov 2017 15:57:00 -0600 Subject: nbd: Fix struct name for structured reads A closer read of the NBD spec shows that a structured reply chunk for a hole is not quite identical to the prefix of a data chunk, because the hole has to also send a 32-bit size field. Although we do not yet send holes, we should fix the misleading information in our header and make it easier for a future patch to support sparse reads. Messed up in commit bae245d1. Signed-off-by: Eric Blake Message-Id: <20171108215703.9295-5-eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nbd/server.c') diff --git a/nbd/server.c b/nbd/server.c index bcf0cdb47c..6ebb7d9c2e 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1280,7 +1280,7 @@ static int coroutine_fn nbd_co_send_structured_read(NBDClient *client, size_t size, Error **errp) { - NBDStructuredRead chunk; + NBDStructuredReadData chunk; struct iovec iov[] = { {.iov_base = &chunk, .iov_len = sizeof(chunk)}, {.iov_base = data, .iov_len = size} -- cgit v1.2.1