]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-io: Relax 'alloc' now that block-status doesn't assert
authorEric Blake <eblake@redhat.com>
Thu, 12 Oct 2017 03:47:20 +0000 (22:47 -0500)
committerKevin Wolf <kwolf@redhat.com>
Thu, 26 Oct 2017 12:45:57 +0000 (14:45 +0200)
commitf0a9c18f9e72ab66d3c57c5c3a43137deb534076
treee7fbc9eb3ddac92c4751ae3719a4a102647614f8
parent8cbf74b23cafd1bcee5fdef769f8e94ace43935f
qemu-io: Relax 'alloc' now that block-status doesn't assert

Previously, the alloc command required that input parameters be
sector-aligned and clamped to 32 bits, because the underlying
bdrv_is_allocated used a 32-bit parameter and asserted aligned
inputs.  But now that we have fixed block status to report a
64-bit bytes value, and to properly round requests on behalf of
guests, we can pass any values, and can use qemu-io to add
coverage that our rounding is correct regardless of the guest
alignment constraints.

Update iotest 177 to intentionally probe block status at
unaligned boundaries as well as with a bytes value that does not
map to 32-bit sectors, which also required tweaking the image
prep to leave an unallocated portion to the image under test.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-io-cmds.c
tests/qemu-iotests/177
tests/qemu-iotests/177.out