On Tue 06 Nov 2018 05:24:36 PM CET, Vladimir Sementsov-Ogievskiy wrote:
>> Is there any reason why some parts of the QEMU code use qemu_blockalign
>> and others qemu_try_blockalign() ? From what I can see it seems to be up
>> to whoever wrote it...
>
> As I understand, the good reason to use _try_ versions, is when we are
> allocating some size, taken from user input, so it may be
> unpredictable large (hm, or just any really large allocation), so, I
> use try_malloc for compressed size, which may be very large in somehow
> corrupted image.

Ah right, the value of the compressed size field can be up to 8192
sectors, or 4MB.

I realized that you should add the coroutine_fn annotation to
qcow2_co_preadv_compressed(). Other than that the patch looks good so,
with that changed,

Reviewed-by: Alberto Garcia <be...@igalia.com>

Berto

Reply via email to