diff options
author | Peter Maydell | 2018-07-09 10:48:01 +0200 |
---|---|---|
committer | Peter Maydell | 2018-07-09 10:48:01 +0200 |
commit | ab3257c281c1a1a91da1090ac9e38ddd8f860c63 (patch) | |
tree | 43019b030a269661197839b9d2bfa85e7c2b77f9 | |
parent | Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (diff) | |
parent | nbd/server: fix nbd_co_send_block_status (diff) | |
download | qemu-ab3257c281c1a1a91da1090ac9e38ddd8f860c63.tar.gz qemu-ab3257c281c1a1a91da1090ac9e38ddd8f860c63.tar.xz qemu-ab3257c281c1a1a91da1090ac9e38ddd8f860c63.zip |
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.c | 5 |
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); } |