qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Dietmar Maurer <dietmar@proxmox.com>
Subject: Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert
Date: Tue, 2 Jul 2013 10:47:00 +0200	[thread overview]
Message-ID: <20130702084700.GA8393@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <51CC304C.80706@linux.vnet.ibm.com>

On Thu, Jun 27, 2013 at 08:30:04PM +0800, Wenchao Xia wrote:
> 于 2013-6-27 17:01, Stefan Hajnoczi 写道:
> >On Tue, Jun 25, 2013 at 07:14:19PM +0800, Wenchao Xia wrote:
> >>于 2013-6-25 17:13, Stefan Hajnoczi 写道:
> >>>On Thu, Jun 20, 2013 at 04:59:17PM +0800, Wenchao Xia wrote:
> >BTW we already have qemu-io -c map which prints out allocation
> >information for an image file.  If that command is extended to support
> >-s then you can get your info easily.
>   Do you mean use it like:
>   1 call qemu-io file -c map -s sn0
>   2 call qemu-io file -c map -s sn1
>   3 for (offset = 0; offset < len; offset +=512) {
>         if (allocated on sn0) {
>              call qemu-io file read -s sn0, into buf0
>         }
>         if (allocated on sn1) {
>              call qemu-io file read -s sn1, into buf1
>         }
>         if strcmp(buf0, buf1) {
>              write down the delta
>         }
>     }
> ?
>   I think it is workable and flex, the bottle neck is the string
> parsing of qemu-io. For delta data info retrieving purpose, qemu-img
> approach would faster.

It's also possible to put Step 3 into qemu-img so that this feature is
fast and easy to use with a single command.

Stefan

  reply	other threads:[~2013-07-02  8:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20  8:59 [Qemu-devel] [RFC] qemu-img: add option -d in convert Wenchao Xia
2013-06-25  9:13 ` Stefan Hajnoczi
2013-06-25 11:14   ` Wenchao Xia
2013-06-27  9:01     ` Stefan Hajnoczi
2013-06-27 12:30       ` Wenchao Xia
2013-07-02  8:47         ` Stefan Hajnoczi [this message]
2013-06-27 12:44       ` Wenchao Xia

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=20130702084700.GA8393@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=dietmar@proxmox.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiawenc@linux.vnet.ibm.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).