qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index()


From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index()
Date: Wed, 17 Jan 2018 15:55:41 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Tue 16 Jan 2018 11:10:37 PM CET, Eric Blake wrote:

>>  static inline int64_t align_offset(int64_t offset, int n)
>>  {
>>      offset = (offset + n - 1) & ~(n - 1);
>
> Unrelated to this commit, but should we switch this to use
> QEMU_ALIGN_UP() instead of open-coding it?

Why not, we can actually use ROUND_UP() instead which is optimized for
powers of two.

I can send the patch.

Berto



reply via email to

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