qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: Correct snapshots size for overlap check
Date: Fri, 20 Sep 2013 12:48:26 +0200	[thread overview]
Message-ID: <20130920104826.GA14738@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1379586555-1479-1-git-send-email-mreitz@redhat.com>

On Thu, Sep 19, 2013 at 12:29:15PM +0200, Max Reitz wrote:
> Using s->snapshots_size instead of snapshots_size for the metadata
> overlap check in qcow2_write_snapshots leads to the detection of an
> overlap with the main qcow2 image header when deleting the last
> snapshot, since s->snapshots_size has not yet been updated and is
> therefore non-zero. However, the offset returned by qcow2_alloc_clusters
> will be zero since snapshots_size is zero. Therefore, an overlap is
> detected albeit no such will occur.
> 
> This patch fixes this by replacing s->snapshots_size by snapshots_size
> when calling qcow2_pre_write_overlap_check.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  block/qcow2-snapshot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

      reply	other threads:[~2013-09-20 10:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 10:29 [Qemu-devel] [PATCH] qcow2: Correct snapshots size for overlap check Max Reitz
2013-09-20 10:48 ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130920104826.GA14738@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).