[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qcow2: aio support for compres
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qcow2: aio support for compressed cluster read |
Date: |
Tue, 6 Nov 2018 15:13:58 +0000 |
06.11.2018 18:06, Alberto Garcia wrote:
> On Thu 01 Nov 2018 07:27:37 PM CET, Vladimir Sementsov-Ogievskiy wrote:
>
>> + buf = g_try_malloc(csize);
>> + if (!buf) {
>> + return -ENOMEM;
>> + }
>> + iov.iov_base = buf;
>> + iov.iov_len = csize;
>> + qemu_iovec_init_external(&local_qiov, &iov, 1);
>>
>> - iov.iov_base = s->cluster_data;
>> - iov.iov_len = csize;
>> - qemu_iovec_init_external(&local_qiov, &iov, 1);
>> + out_buf = qemu_blockalign(bs, s->cluster_size);
> You should also check whether out_buf is NULL, shouldn't you?
No, it will abort on fail. qemu_try_blockalign result should be checked.
>
> Berto
--
Best regards,
Vladimir
- Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] qcow2: make more generic interface for qcow2_compress, (continued)
Re: [Qemu-devel] [PATCH 0/7] qcow2 decompress in threads, Kevin Wolf, 2018/11/12