[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
signature.asc
Description: OpenPGP digital signature
- [PATCH v2 0/4] qcow2: Misc BDRV_SECTOR_SIZE updates, Alberto Garcia, 2020/01/09
- [PATCH v2 3/4] qcow2: Tighten cluster_offset alignment assertions, Alberto Garcia, 2020/01/09
- [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/09
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Max Reitz, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Max Reitz, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Max Reitz, 2020/01/14
- Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size, Alberto Garcia, 2020/01/16
[PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value, Alberto Garcia, 2020/01/09