qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: lihuiba <magazine.lihuiba@163.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qcow2 snapshot + resize
Date: Thu, 14 Jan 2016 13:17:00 +0100	[thread overview]
Message-ID: <20160114121700.GB4084@noname.redhat.com> (raw)
In-Reply-To: <568D4109.5060107@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]

Am 06.01.2016 um 17:30 hat Max Reitz geschrieben:
> On 06.01.2016 17:28, Eric Blake wrote:
> > On 01/06/2016 09:20 AM, Max Reitz wrote:
> > 
> >>> If I take a snapshot while the guest sees a 1G disk, then resize the
> >>> disk to 2G, then roll back to the point in time of the snapshot, I'd
> >>> expect the disk to roll back to 1G in size.  Anything else is likely to
> >>> confuse the guest.  And that's what current resize support already does
> >>> (it only resizes the active image, not the snapshots).
> >>
> >> No, the current resize operation just refuses to resize the image if it
> >> has any snapshots. Snapshots currently do not store the size of the
> >> image when they were created.
> > 
> > Huh? I thought that we specifically added bytes 48-55 per snapshot entry
> > in the qcow2v3 description specifically so that internal snapshots DO
> > record the size of the image when the snapshot was created.
> 
> Oh, you're right! Well, then that was probably the intention, yes.
> However, resizing an image with snapshots will still fail.

I guess the only thing that would need to implement something new is
qcow2_snapshot_goto(), which currently refuses to load a snapshot that
has a different disk size.

Once this is done, just removing the check in qcow2_truncate() should be
okay.

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-01-14 12:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 12:10 [Qemu-devel] qcow2 snapshot + resize lihuiba
2016-01-05 13:55 ` Eric Blake
2016-01-05 17:36   ` John Snow
2016-01-06  2:50   ` lihuiba
2016-01-06 15:04     ` Eric Blake
2016-01-06 16:20       ` Max Reitz
2016-01-06 16:28         ` Eric Blake
2016-01-06 16:30           ` Max Reitz
2016-01-14 12:17             ` Kevin Wolf [this message]
2016-01-19  2:42               ` lihuiba
  -- strict thread matches above, loose matches on Subject: below --
2015-12-29  9:38 lihuiba
2016-01-04 17:38 ` Max Reitz

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=20160114121700.GB4084@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=magazine.lihuiba@163.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).