qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH] block/qcow2-threads: fix qcow2_decompress


From: Max Reitz
Subject: Re: [PATCH] block/qcow2-threads: fix qcow2_decompress
Date: Mon, 9 Mar 2020 19:41:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 02.03.20 16:09, Vladimir Sementsov-Ogievskiy wrote:
> On success path we return what inflate() returns instead of 0. And it
> most probably works for Z_STREAM_END as it is positive, but is
> definitely broken for Z_BUF_ERROR.
> 
> While being here, switch to errno return code, to be closer to
> qcow2_compress API (and usual expectations).
> 
> Revert condition in if to be more positive. Drop dead initialization of
> ret.
> 
> Cc: address@hidden # v4.0
> Fixes: 341926ab83e2b
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> 
> Hi!
> 
> Reviewing Den's series about zstd in qcow2 support, I found an existing
> bug. Let's fix it. This is to be a new base of zstd series.
> 
>  block/qcow2-threads.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Thanks, applied to my block branch:

https://git.xanclic.moe/XanClic/qemu/commits/branch/block

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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