On 01/16/2013 09:24 AM, Benoît Canet wrote:
> Signed-off-by: Benoit Canet <ben...@irqsave.net>
> ---
>  block/qcow2.c |   43 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 

> +    if (s->has_dedup) {
> +        memset(&dedup_table_extension, 0, sizeof(dedup_table_extension));
> +        dedup_table_extension.offset = cpu_to_be64(s->dedup_table_offset);
> +        dedup_table_extension.size = cpu_to_be32(s->dedup_table_size);
> +        dedup_table_extension.hash_algo = s->dedup_hash_algo;
> +        dedup_table_extension.strategies |= 1; /* RAM based lookup */
> +        dedup_table_extension.strategies |= 1 << 2; /* deduplication running 
> */

Magic numbers here; you should probably give these bits a symbolic name
via #define or enum.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to