Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-07 Thread Max Reitz
On 06.04.20 16:34, Alberto Garcia wrote: > When issuing a compressed write request the number of bytes must be a > multiple of the cluster size or reach the end of the last cluster. > > With the current code such requests are allowed and we hit an > assertion: > >$ qemu-img create -f qcow2 im

Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-07 Thread Vladimir Sementsov-Ogievskiy
06.04.2020 17:34, Alberto Garcia wrote: When issuing a compressed write request the number of bytes must be a multiple of the cluster size or reach the end of the last cluster. With the current code such requests are allowed and we hit an assertion: $ qemu-img create -f qcow2 img.qcow2 1M

Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-06 Thread Andrey Shinkevich
CH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part() I forgot to add the "for-5.0" tag in the subject, do I need to resend the patch? Berto

Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-06 Thread Alberto Garcia
I forgot to add the "for-5.0" tag in the subject, do I need to resend the patch? Berto

Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-06 Thread Andrey Shinkevich
Subject: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

[PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-06 Thread Alberto Garcia
When issuing a compressed write request the number of bytes must be a multiple of the cluster size or reach the end of the last cluster. With the current code such requests are allowed and we hit an assertion: $ qemu-img create -f qcow2 img.qcow2 1M $ qemu-io -c 'write -c 0 32k' img.qcow2