qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: "Richard W.M. Jones" <rjones@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?
Date: Mon, 9 Nov 2015 17:03:50 +0100	[thread overview]
Message-ID: <20151109160350.GA3621@noname.redhat.com> (raw)
In-Reply-To: <20151105094601.GA14058@ad.usersys.redhat.com>

Am 05.11.2015 um 10:46 hat Fam Zheng geschrieben:
> On Thu, 11/05 08:56, Richard W.M. Jones wrote:
> > On Thu, Nov 05, 2015 at 03:14:49PM +0800, Fam Zheng wrote:
> > > I don't think this the purpose of "qemu-img commit". Committing
> > > "new" data in overlay.qcow2 has little to do with discarding backing
> > > image's fragments where there are only explict zeroes.
> > 
> > In that case, why didn't this step sparsify the backing file?
> 
> Commit should be (by default, at least) as fast as possible, so committing
> overlay.qcow2 shouldn't involve scanning the whole backing file.

But if we do need to commit some data to the backing file, we should try
to be efficient (i.e. use zero clusters in the backing file). I think
your mirror fixes achieve this.

This should actually be enough for virt-sparsify because IIUC it fills
the overlay with zero clusters in the right places before committing.

Kevin

      parent reply	other threads:[~2015-11-09 16:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 16:37 [Qemu-devel] Should 'qemu-img commit' sparsify the backing file? Richard W.M. Jones
2015-11-05  7:14 ` Fam Zheng
2015-11-05  8:56   ` Richard W.M. Jones
2015-11-05  9:46     ` Fam Zheng
2015-11-05 12:18       ` Richard W.M. Jones
2015-11-09 16:03       ` Kevin Wolf [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=20151109160350.GA3621@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@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).