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

2020-03-09 Thread Max Reitz
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 >

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

2020-03-04 Thread Ján Tomko
On a Monday in 2020, 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_co

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

2020-03-02 Thread Alberto Garcia
On Mon 02 Mar 2020 04:09:30 PM CET, 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

[PATCH] block/qcow2-threads: fix qcow2_decompress

2020-03-02 Thread Vladimir Sementsov-Ogievskiy
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 i