From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Richard W.M. Jones" <rjones@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation.
Date: Mon, 21 May 2012 17:40:17 +0200 [thread overview]
Message-ID: <4FBA61E1.1010003@redhat.com> (raw)
In-Reply-To: <4FBA5F95.9010105@redhat.com>
Am 21.05.2012 17:30, schrieb Eric Blake:
> On 05/21/2012 07:59 AM, Richard W.M. Jones wrote:
>
>>>
>>> Hm, I'm wondering... If I have a command line like this:
>>>
>>> qemu-img diff -b base.img modified.img diff.qcow2
>>>
>>> Would this be equivalent to this sequence?
>>>
>>> qemu-img create -f qcow2 -b modified.img diff.qcow2
>>> qemu-img rebase -b base.img diff.qcow2
>
> So 'qemu-img rebase' is able to rebase to any other image, even if
> base.img is nowhere in the backing chain of modified.img? That means it
> is more powerful than runtime 'block-stream' monitor command under qemu,
> which can only do a block pull from an earlier point in the backing chain.
Correct. 'qemu-img rebase' compares the old and the new backing file for
each unallocated cluster of the overlay, and if they differ, it copies
the data from the old backing file into the overlay.
Not sure if there would be any real use for a real live rebase, but even
if there was, implementing it probably wouldn't be a priority for most
of us.
>> Yes. I tried for a while to work out the sequence of commands that
>> could make a diff using 'qemu-img rebase', but it wasn't obvious and I
>> gave up. It should at least be documented. How about the attached
>> patch?
>
> Seems reasonable to me. A two-command sequence of qemu-img to
> manipulate offline images isn't all that bad; it's different from the
> case of a disk image in active use by qemu.
Even there you use a two-command sequence when you do an external
'qemu-img create' and then use the 'existing' mode of snapshots or
mirroring. :-)
Kevin
prev parent reply other threads:[~2012-05-21 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 15:34 [Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation Richard W.M. Jones
2012-05-17 15:49 ` Eric Blake
2012-05-21 13:29 ` Kevin Wolf
2012-05-21 13:59 ` Richard W.M. Jones
2012-05-21 14:06 ` Kevin Wolf
2012-05-21 15:30 ` Eric Blake
2012-05-21 15:40 ` 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=4FBA61E1.1010003@redhat.com \
--to=kwolf@redhat.com \
--cc=eblake@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).