qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v5 11/26] qcow2: More helpers for refcount modif


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v5 11/26] qcow2: More helpers for refcount modification
Date: Wed, 04 Feb 2015 10:59:33 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015-02-04 at 08:53, Kevin Wolf wrote:
Am 15.12.2014 um 13:50 hat Max Reitz geschrieben:
Add helper functions for getting and setting refcounts in a refcount
array for any possible refcount order, and choose the correct one during
refcount initialization.

Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Hm... Wouldn't it be better to have a single generic implementation that
is based on uint64_t* and calculates the right shifts and bitmasks on
the fly?

Please do try. I tried it, and what I came up with were horrible unreadable abominations. I think you can do better, but I don't know whether it'll look better than this apparent code duplications.

Max



reply via email to

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