From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPBx-0003kp-AU for qemu-devel@nongnu.org; Thu, 05 Feb 2015 11:22:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJPBs-0000FB-To for qemu-devel@nongnu.org; Thu, 05 Feb 2015 11:22:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPBs-0000F6-My for qemu-devel@nongnu.org; Thu, 05 Feb 2015 11:22:04 -0500 Message-ID: <54D38CAD.80304@redhat.com> Date: Thu, 05 Feb 2015 10:30:53 -0500 From: Max Reitz MIME-Version: 1.0 References: <1416844620-17717-1-git-send-email-mreitz@redhat.com> <1416844620-17717-10-git-send-email-mreitz@redhat.com> <54D38C3E.4090605@redhat.com> In-Reply-To: <54D38C3E.4090605@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 09/12] qcow2/overlaps: Protect snapshot table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Stefan Hajnoczi 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 >> --- >> 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