52b10c9c0c
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>
35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
QA output created by 241
|
|
|
|
=== Exporting unaligned raw image, natural alignment ===
|
|
|
|
exports available: 1
|
|
export: ''
|
|
size: 1024
|
|
min block: 1
|
|
[{ "start": 0, "length": 1000, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
|
|
{ "start": 1000, "length": 24, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": OFFSET}]
|
|
1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
|
|
|
|
=== Exporting unaligned raw image, forced server sector alignment ===
|
|
|
|
exports available: 1
|
|
export: ''
|
|
size: 1024
|
|
min block: 512
|
|
[{ "start": 0, "length": 1024, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET}]
|
|
1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
|
|
WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
|
|
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
|
|
Specify the 'raw' format explicitly to remove the restrictions.
|
|
|
|
=== Exporting unaligned raw image, forced client sector alignment ===
|
|
|
|
exports available: 1
|
|
export: ''
|
|
size: 1024
|
|
min block: 1
|
|
[{ "start": 0, "length": 1000, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
|
|
{ "start": 1000, "length": 24, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": OFFSET}]
|
|
1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
|
|
*** done
|