qemu-devel
[Top][All Lists]
Advanced

[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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]