On 11/26/2012 06:05 AM, Benoît Canet wrote: > Signed-off-by: Benoit Canet <ben...@irqsave.net> > --- > docs/specs/qcow2.txt | 33 ++++++++++++++++++++++++++++++++- > 1 file changed, 32 insertions(+), 1 deletion(-) >
In addition to Stefan's comments, > @@ -159,6 +163,33 @@ the header extension data. Each entry look like this: > terminated if it has full length) > > > +== Deduplication == > + > +The deduplication extension contains the offset and size of the deduplication > +table. > + > + Byte 0 - 7: Offset > + > + 8 - 11: Size > + > +== Deduplication table == > + > +The deduplication table contains 64 bits offsets to the level 2 deduplication 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. s/64 bits/64-bit/ > + > +Entries in the deduplication table are orderered by physical cluster index. s/orderered/ordered/ > + > +The number of entries in an l2 deduplication table cluster is : > +l2_dedup_cluster_entries = 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 = physical_cluster_index / l2_dedup_cluster_entries > + > +The index in the level 2 deduplication table is: > +l2_dedup_index = physical_cluster_index % l2_dedup_cluster_entries > + > == Host cluster management == > > qcow2 manages the allocation of host clusters by maintaining a reference > count > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature