]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-img: map: report compressed data blocks
authorAndrey Drobyshev via <qemu-block@nongnu.org>
Thu, 7 Sep 2023 21:02:26 +0000 (00:02 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Sep 2023 15:46:01 +0000 (17:46 +0200)
commit52b10c9c0c68e90f9503ba578f2eaf8975c1977f
tree7f605b83196e95f5b70c7b653fc4dc1f89c45d26
parent2848289168fbbd9a6855c84ec8fde8929a2b042b
qemu-img: map: report compressed data blocks

Right now "qemu-img map" reports compressed blocks as containing data
but having no host offset.  This is not very informative.  Instead,
let's add another boolean field named "compressed" in case JSON output
mode is specified.  This is achieved by utilizing new allocation status
flag BDRV_BLOCK_COMPRESSED for bdrv_block_status().

Also update the expected qemu-iotests outputs to contain the new field.

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20230907210226.953821-3-andrey.drobyshev@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
16 files changed:
qapi/block-core.json
qemu-img.c
tests/qemu-iotests/122.out
tests/qemu-iotests/146.out
tests/qemu-iotests/154.out
tests/qemu-iotests/179.out
tests/qemu-iotests/209.out
tests/qemu-iotests/221.out
tests/qemu-iotests/223.out
tests/qemu-iotests/241.out
tests/qemu-iotests/244.out
tests/qemu-iotests/252.out
tests/qemu-iotests/253.out
tests/qemu-iotests/274.out
tests/qemu-iotests/tests/nbd-qemu-allocation.out
tests/qemu-iotests/tests/qemu-img-bitmaps.out