qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/2] qemu-img: map: report compressed data blocks


From: Kevin Wolf
Subject: Re: [PATCH v3 2/2] qemu-img: map: report compressed data blocks
Date: Fri, 15 Sep 2023 09:25:49 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]