]> Git Repo - qemu.git/commitdiff
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-07-07' into staging
authorPeter Maydell <[email protected]>
Mon, 9 Jul 2018 08:48:01 +0000 (09:48 +0100)
committerPeter Maydell <[email protected]>
Mon, 9 Jul 2018 08:48:01 +0000 (09:48 +0100)
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 <[email protected]>"
# gpg:                 aka "Eric Blake (Free Software Programmer) <[email protected]>"
# 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 <[email protected]>
nbd/server.c

index e52b76bd1a4a7a344154c36c1585f10d406ea967..ea5fe0eb336f30e35c1d1b91b0510ab6972e72ca 100644 (file)
@@ -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);
 }
 
This page took 0.039955 seconds and 4 git commands to generate.