aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-07-09 09:48:01 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-07-09 09:48:01 +0100
commitab3257c281c1a1a91da1090ac9e38ddd8f860c63 (patch)
tree43019b030a269661197839b9d2bfa85e7c2b77f9
parent43a473993fd9378bf850dcafa68eb6dee8c300f8 (diff)
parent0c0eaed14721f8a9db334deb35316411c512059a (diff)
downloadqemu-arm-ab3257c281c1a1a91da1090ac9e38ddd8f860c63.tar.gz
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-07-07' into staging
nbd patches for 2018-07-07 Minor improvement for tracing of NBD block status - Vladimir Sementsov-Ogievskiy: nbd/server: fix nbd_co_send_block_status # gpg: Signature made Sun 08 Jul 2018 02:45:18 BST # gpg: using RSA key A7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" # gpg: aka "[jpeg image of size 6874]" # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2018-07-07: nbd/server: fix nbd_co_send_block_status Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--nbd/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nbd/server.c b/nbd/server.c
index e52b76bd1a..ea5fe0eb33 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1910,7 +1910,7 @@ static int nbd_co_send_extents(NBDClient *client, uint64_t handle,
/* Get block status from the exported device and send it to the client */
static int nbd_co_send_block_status(NBDClient *client, uint64_t handle,
BlockDriverState *bs, uint64_t offset,
- uint64_t length, bool last,
+ uint32_t length, bool last,
uint32_t context_id, Error **errp)
{
int ret;
@@ -1922,7 +1922,8 @@ static int nbd_co_send_block_status(NBDClient *client, uint64_t handle,
client, handle, -ret, "can't get block status", errp);
}
- return nbd_co_send_extents(client, handle, &extent, 1, length, last,
+ return nbd_co_send_extents(client, handle, &extent, 1,
+ be32_to_cpu(extent.length), last,
context_id, errp);
}