From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiYrI-0007Lq-Rt for qemu-devel@nongnu.org; Tue, 11 Dec 2012 18:03:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiYrH-0002Uz-Hb for qemu-devel@nongnu.org; Tue, 11 Dec 2012 18:03:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiYrH-0002Up-9V for qemu-devel@nongnu.org; Tue, 11 Dec 2012 18:03:27 -0500 Message-ID: <50C7BBB4.7090700@redhat.com> Date: Tue, 11 Dec 2012 16:03:16 -0700 From: Eric Blake MIME-Version: 1.0 References: <1353935123-24199-1-git-send-email-benoit@irqsave.net> <1353935123-24199-2-git-send-email-benoit@irqsave.net> In-Reply-To: <1353935123-24199-2-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig15238ACA3140A2B79BC833FA" Subject: Re: [Qemu-devel] [RFC V3 01/24] qcow2: Add deduplication to the qcow2 specification. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig15238ACA3140A2B79BC833FA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/26/2012 06:05 AM, Beno=C3=AEt Canet wrote: > Signed-off-by: Benoit Canet > --- > docs/specs/qcow2.txt | 33 ++++++++++++++++++++++++++++++++- > 1 file changed, 32 insertions(+), 1 deletion(-) >=20 In addition to Stefan's comments, > @@ -159,6 +163,33 @@ the header extension data. Each entry look like th= is: > terminated if it has full length) > =20 > =20 > +=3D=3D Deduplication =3D=3D > + > +The deduplication extension contains the offset and size of the dedupl= ication > +table. > + > + Byte 0 - 7: Offset > + > + 8 - 11: Size > + > +=3D=3D Deduplication table =3D=3D > + > +The deduplication table contains 64 bits offsets to the level 2 dedupl= ication s/64 bits/64-bit/ > +table clusters. > +Each entry of these clusters contains a 32 bytes SHA256 hash followed = by the s/32 bytes/32-byte/ > +64 bits logical offset of the first encountered block having this hash= =2E s/64 bits/64-bit/ > + > +Entries in the deduplication table are orderered by physical cluster i= ndex. s/orderered/ordered/ > + > +The number of entries in an l2 deduplication table cluster is : > +l2_dedup_cluster_entries =3D cluster_size / (32 + 8) 32+8 is not a power of two; what happens to the tail bytes at the end of a cluster of entries? If you define them to be 0 now, you can use them for possible extensions later. > + > +The index in the level 1 deduplication table is : > +l1_dedup_index =3D physical_cluster_index / l2_dedup_cluster_entries > + > +The index in the level 2 deduplication table is: > +l2_dedup_index =3D physical_cluster_index % l2_dedup_cluster_entries > + > =3D=3D Host cluster management =3D=3D > =20 > qcow2 manages the allocation of host clusters by maintaining a referen= ce count >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig15238ACA3140A2B79BC833FA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQx7u0AAoJEKeha0olJ0NqVA0H/2r8HAcloxlCJRyqKNBrS7oT mgYOnBdUXNSjz/Ci9cCHzspRZiv69fj0wAzUI2cZFtgUVkCvYqMPfiVeFK2LTYwF S2CnfjTvquAH9/SGaIqFFPbE/K7NdMMLiGwdpfY5RWlkBK/p/vaNjWk6N9q5As9G 3p6ZezXDcHwcNJG28ffvsWUwYnpwK4UMycwmGGm7Rn18UIk90LVLE4xbgjCO5gRR qRgM1aSikxr/NAMnNlK4N7sMTw1BjfpjMJvwN1o+9GM0v1SBIUZo1Aq1/I3ZsIgu EcEh5PB9+zt+PQW5/f2JLZpjKKhivO8QPzzuMSFvniHFoeZku0Y+xCqnV1ZrL1M= =NAuh -----END PGP SIGNATURE----- --------------enig15238ACA3140A2B79BC833FA--