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: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 09/12] qcow2/overlaps: Protect snapshot table
Date: Thu, 05 Feb 2015 10:30:53 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015-02-05 at 10:29, Eric Blake wrote:
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.

I do care. :-)

In this case I didn't align it because that would have broken the 80 characters limit.

Mayb



reply via email to

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