From: Andrey Drobyshev via <qemu-devel@nongnu.org>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, hreitz@redhat.com,
andrey.drobyshev@virtuozzo.com, den@virtuozzo.com
Subject: [PATCH 0/3] qemu-img: map: implement support for compressed clusters
Date: Wed, 7 Jun 2023 18:26:24 +0300 [thread overview]
Message-ID: <20230607152627.468786-1-andrey.drobyshev@virtuozzo.com> (raw)
This series adds "compressed" field to the output of "qemu-img map"
command, specifying whether or not data block is compressed. Only
JSON output mode is affected. With this applied, output looks like so:
# qemu-img create -f qcow2 img.qcow2 192K
# qemu-io -c "write -c -P 0xaa 0 64K" img.qcow2
# qemu-io -c "write -P 0xbb 64K 64K" img.qcow2
# qemu-img map --output=json img.qcow2
[{ "start": 0, "length": 65536, "depth": 0, "present": true, "zero": false, "data": true, "compressed": true},
{ "start": 65536, "length": 65536, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 393216},
{ "start": 131072, "length": 65536, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}]
Only formats supporting compression are affected (qcow, qcow2).
Andrey Drobyshev (3):
block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()
qemu-img: map: report compressed data blocks
qemu-iotests: update expected tests output to contain "compressed"
field
block/qcow.c | 5 +-
block/qcow2.c | 3 +
include/block/block-common.h | 3 +
qapi/block-core.json | 7 +-
qemu-img.c | 16 +-
tests/qemu-iotests/122.out | 84 ++++----
tests/qemu-iotests/154.out | 194 +++++++++---------
tests/qemu-iotests/179.out | 178 ++++++++--------
tests/qemu-iotests/244.out | 24 +--
tests/qemu-iotests/252.out | 10 +-
tests/qemu-iotests/274.out | 48 ++---
.../tests/nbd-qemu-allocation.out | 6 +-
12 files changed, 300 insertions(+), 278 deletions(-)
--
2.31.1
next reply other threads:[~2023-06-07 15:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 15:26 Andrey Drobyshev via [this message]
2023-06-07 15:26 ` [PATCH 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status() Andrey Drobyshev via
2023-06-21 17:08 ` Denis V. Lunev
2023-06-21 17:46 ` Denis V. Lunev
2023-06-21 18:12 ` Andrey Drobyshev
2023-06-07 15:26 ` [PATCH 2/3] qemu-img: map: report compressed data blocks Andrey Drobyshev via
2023-06-21 18:12 ` Denis V. Lunev
2023-07-06 13:10 ` Andrey Drobyshev
2023-07-06 13:51 ` Denis V. Lunev
2023-06-07 15:26 ` [PATCH 3/3] qemu-iotests: update expected tests output to contain "compressed" field Andrey Drobyshev via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230607152627.468786-1-andrey.drobyshev@virtuozzo.com \
--to=qemu-devel@nongnu.org \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=den@virtuozzo.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).