qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/4] qcow2: Tighten cluster_offset alignment assertions


From: Max Reitz
Subject: Re: [PATCH v2 3/4] qcow2: Tighten cluster_offset alignment assertions
Date: Tue, 14 Jan 2020 14:58:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

On 10.01.20 13:14, Alberto Garcia wrote:
> On Thu 09 Jan 2020 08:13:01 PM CET, Alberto Garcia wrote:
>> -        assert((cluster_offset & 511) == 0);
>> +        assert(QEMU_IS_ALIGNED(cluster_offset, s->cluster_size));
> 
> On second thoughts this patch could also use the (probably more
> efficient) offset_into_cluster() call instead.
> 
> I can resend it if you think it's a good idea.
Either way works for me.  (I don’t think it’s going to make any
difference in practice, but of course, why not.)

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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