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.drobys...@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.

Andrey

Reply via email to