qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files
Date: Fri, 17 Jan 2014 11:10:25 -0500	[thread overview]
Message-ID: <20140117161025.GB1485@localhost.localdomain> (raw)
In-Reply-To: <20140117071710.GB19441@stefanha-thinkpad.redhat.com>

On Fri, Jan 17, 2014 at 03:17:10PM +0800, Stefan Hajnoczi wrote:
> On Mon, Jan 13, 2014 at 03:18:44PM -0500, Jeff Cody wrote:
> > If a snapshot is larger than a backing file, then the offline bdrv_commit and
> > the live active layer commit will fail with an i/o error (usually).  A live
> > commit of a non-active layer will complete successfully, as it runs
> > bdrv_truncate() on the backing image to resize it to the larger size.
> > 
> > For both bdrv_commit() and commit_active_start(), this series will resize
> > the underlying base image if needed.  If the resize fails, an error will
> > be returned.
> 
> This got me thinking about the opposite case: when the snapshot is
> smaller than the backing file.  We leave the backing file with its
> original size.  In practice this is "safe" because the partition and
> volume metadata should show the smaller size.  If the user really wants
> to shrink the device they can still truncate after completing the
> "commit" operation.
> 
> Can you update the QEMU documentation to explicitly cover both snapshot
>  > backing and snapshot < backing cases?
>

Yes, no problem.

      reply	other threads:[~2014-01-17 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 20:18 [Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files Jeff Cody
2014-01-13 20:18 ` [Qemu-devel] [PATCH 1/2] block: resize backing file image during offline commit, if necessary Jeff Cody
2014-01-17  7:23   ` Stefan Hajnoczi
2014-01-13 20:18 ` [Qemu-devel] [PATCH 2/2] block: resize backing image during active layer commit, if needed Jeff Cody
2014-01-15  5:58   ` Fam Zheng
2014-01-17 16:29     ` Jeff Cody
2014-01-17  7:17 ` [Qemu-devel] [PATCH 0/2] block: commits of snapshots larger than backing files Stefan Hajnoczi
2014-01-17 16:10   ` Jeff Cody [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=20140117161025.GB1485@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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).