qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 09/12] qcow2/overlaps: Protect snapshot table


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 09/12] qcow2/overlaps: Protect snapshot table
Date: Thu, 05 Feb 2015 08:29:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 11/24/2014 08:56 AM, Max Reitz wrote:
> Keep track of the snapshot table in the metadata list to protect it
> against accidental modifications.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/qcow2-snapshot.c | 10 ++++++++++
>  block/qcow2.c          |  6 ++++++
>  2 files changed, 16 insertions(+)
> 

> +    if (header.nb_snapshots) {
> +        qcow2_metadata_list_enter(bs, header.snapshots_offset,
> +                                  size_to_clusters(s, header.nb_snapshots *
> +                                                   
> sizeof(QCowSnapshotHeader)),

In other patches in this series, you had been aligning the sizeof() with
the parameter expression it continues, rather than the first parameter.

blah(s, count *
        sizeof(struct))

vs.

blah(s, count *
     sizeof(struct))


I don't care either way, just wanted to point it out, in case you care.

Reviewed-by: Eric Blake <address@hidden>

-- 
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

[Prev in Thread] Current Thread [Next in Thread]