qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Cc: Eric Blake <eblake@redhat.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org, hreitz@redhat.com,
	fam@euphon.net, vsementsov@yandex-team.ru, den@virtuozzo.com
Subject: Re: [PATCH v3 2/2] qemu-img: map: report compressed data blocks
Date: Fri, 15 Sep 2023 09:25:49 +0200	[thread overview]
Message-ID: <ZQQG/UVwK3Vb6O23@redhat.com> (raw)
In-Reply-To: <e2e0bf60-1a3e-4f48-8c5a-81e16d5245ad@virtuozzo.com>

Am 14.09.2023 um 23:40 hat Andrey Drobyshev geschrieben:
> On 9/15/23 00:17, Eric Blake wrote:
> > On Fri, Sep 08, 2023 at 12:02:26AM +0300, Andrey Drobyshev wrote:
> >> 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>
> >> ---
> > 
> >> +++ b/qapi/block-core.json
> >> @@ -409,6 +409,9 @@
> >>  #
> >>  # @zero: whether the virtual blocks read as zeroes
> >>  #
> >> +# @compressed: true indicates that data is stored compressed.  Only valid
> >> +#     for the formats whith support compression (since 8.2)
> > 
> > s/whith/which/
> > 
> > "compressed":false seems universally valid for all other file formats,
> > and the field is not marked as optional.  Do we really need the
> > disclaimer?  Could we get by with the shorter 'Will be false for
> > formats that do not support compression', or by omitting it
> > altogether?
> > 
> 
> You're right, this remark should've been removed as it only makes sense
> in case of the field being optional.  Feel free to remove it altogether,
> or I can send a follow-up if you prefer.

I'm updating it in my queue to read:

# @compressed: true if the data is stored compressed (since 8.2)

Kevin



  reply	other threads:[~2023-09-15  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 21:02 [PATCH v3 0/2] qemu-img: map: implement support for compressed clusters Andrey Drobyshev via
2023-09-07 21:02 ` [PATCH v3 1/2] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status() Andrey Drobyshev via
2023-09-07 21:02 ` [PATCH v3 2/2] qemu-img: map: report compressed data blocks Andrey Drobyshev via
2023-09-14 21:17   ` Eric Blake
2023-09-14 21:40     ` Andrey Drobyshev
2023-09-15  7:25       ` Kevin Wolf [this message]
2023-09-14 13:34 ` [PATCH v3 0/2] qemu-img: map: implement support for compressed clusters Kevin Wolf

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=ZQQG/UVwK3Vb6O23@redhat.com \
    --to=kwolf@redhat.com \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=den@virtuozzo.com \
    --cc=eblake@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.ru \
    /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).