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