On Tue 16 Jan 2018 10:05:08 PM CET, Eric Blake wrote:
>> @@ -331,7 +330,7 @@ static int qcow2_cache_do_get(BlockDriverState *bs,
>> Qcow2Cache *c,
>> trace_qcow2_cache_get(qemu_coroutine_self(), c == s->l2_table_cache,
>> offset, read_from_disk);
>>
>> - if (offset_into_cluster(s, offset)) {
>> + if (offset & (c->table_size - 1)) {
>
> Worth writing that as QEMU_IS_ALIGNED(offset, c->table_size) instead
> of open-coding the bit-wise math?
Oh, indeed, I very much prefer using macros/functions instead of dealing
with bits directly. I'll change it for the next revision.
Berto