From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiO75-0002Mx-G0 for qemu-devel@nongnu.org; Tue, 11 Dec 2012 06:35:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiO6x-0000tw-RU for qemu-devel@nongnu.org; Tue, 11 Dec 2012 06:35:03 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:54883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiO6x-0000tm-L5 for qemu-devel@nongnu.org; Tue, 11 Dec 2012 06:34:55 -0500 Received: by mail-wi0-f171.google.com with SMTP id hn14so1720786wib.10 for ; Tue, 11 Dec 2012 03:34:54 -0800 (PST) Date: Tue, 11 Dec 2012 12:34:51 +0100 From: Stefan Hajnoczi Message-ID: <20121211113451.GI796@stefanha-thinkpad.muc.redhat.com> References: <1353935123-24199-1-git-send-email-benoit@irqsave.net> <1353935123-24199-3-git-send-email-benoit@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1353935123-24199-3-git-send-email-benoit@irqsave.net> Subject: Re: [Qemu-devel] [RFC V3 02/24] qcow2: Add deduplication structures and fields. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Mon, Nov 26, 2012 at 02:05:01PM +0100, Benoît Canet wrote: > diff --git a/block/qcow2.h b/block/qcow2.h > index b4eb654..e192001 100644 > --- a/block/qcow2.h > +++ b/block/qcow2.h > @@ -58,6 +58,23 @@ > > #define DEFAULT_CLUSTER_SIZE 65536 > > +/* deduplication node */ > +typedef struct { > + uint8_t *hash; /* 32 bytes hash of a given cluster */ Pointer to the hash value instead of storing the value inline? At this point in the series I'm not sure yet why it's not stored inline. That way we'd avoid a 4- or 8-byte pointer to a separately allocated 32-byte blob. Maybe there is a reason later on... Stefan