From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvnNj-0004RS-87 for qemu-devel@nongnu.org; Thu, 17 Jan 2013 06:11:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvnNd-0007u5-2W for qemu-devel@nongnu.org; Thu, 17 Jan 2013 06:11:39 -0500 Received: from nodalink.pck.nerim.net ([62.212.105.220]:43881 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvnNc-0007tn-Qy for qemu-devel@nongnu.org; Thu, 17 Jan 2013 06:11:33 -0500 Date: Thu, 17 Jan 2013 12:11:59 +0100 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20130117111159.GA3448@irqsave.net> References: <1358353508-5369-1-git-send-email-benoit@irqsave.net> <1358353508-5369-13-git-send-email-benoit@irqsave.net> <50F70924.90904@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <50F70924.90904@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC V1 12/14] qcow2: Add qcow2_dedup_update_metrics to compute dedup RAM usage. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Le Wednesday 16 Jan 2013 =E0 13:10:12 (-0700), Eric Blake a =E9crit : > On 01/16/2013 09:25 AM, Beno=EEt Canet wrote: > > --- > > block/qcow2-dedup.c | 13 +++++++++++++ > > block/qcow2.h | 1 + > > 2 files changed, 14 insertions(+) > >=20 > > diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c > > index db23b71..4305746 100644 > > --- a/block/qcow2-dedup.c > > +++ b/block/qcow2-dedup.c > > @@ -1311,3 +1311,16 @@ void qcow2_dedup_close(BlockDriverState *bs) > > { > > qcow2_dedup_free(bs); > > } > > + > > +#define GTREE_NODE_SIZE sizeof(int) * 5 >=20 > Improperly parenthesized. Also, this feels like a magic number, is > there an actual sizeof(struct) you could use instead of hand-computing > how much is used per node? No the glib implementation totally hide it's structures.