qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_syn


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table
Date: Wed, 22 Oct 2014 16:18:32 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 10/21/2014 03:24 AM, Max Reitz wrote:
> On 2014-10-21 at 10:04, Zhang Haoyu wrote:
>> Use local variable to bdrv_pwrite_sync L1 table,
>> needless to make conversion of cached L1 table between
>> big-endian and host style.
>>
>> Signed-off-by: Zhang Haoyu <address@hidden>
>> ---
>>   block/qcow2-refcount.c | 22 +++++++---------------
>>   1 file changed, 7 insertions(+), 15 deletions(-)
>>

I know we're up to v5 and that Max already took it into his branch, but...


>>       l1_size2 = l1_size * sizeof(uint64_t);
>> +    l1_table = g_try_malloc0(align_offset(l1_size2, 512));
> 
> I wanted to propose using qemu_try_blockalign(), but since it'd require
> a memset() afterwards, it gets rather ugly.

Not after this recent patch:

https://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02499.html

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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