[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert

From: Wenchao Xia
Subject: Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert
Date: Thu, 27 Jun 2013 20:44:22 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

于 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:

If I understand correctly, you have a backing chain with internal


And you want to convert this to a chain of external snapshots:

   What it looks like is convert into external snapshots, actually
requirement is get delta data from internal snapshot, external snapshots
have delta data by nature so it is a way to orginize it. This patch
will help get that delta data.

Copying all the data out into external files in order to get
is_allocated information seems very inefficient.

  Forget to say, my purpose is not get is_allocated info, but
get the different data between two snapshots or images. Now qemu-img
can do it in-directly as the example shows, the -d option will make it
simpler and faster.

for example imageA(sn0, sn1, sn2), it will help to get different data
between sn0 and sn2.

  An alternative way is let qemu-nbd export sn0 and sn2, then user
diff the data itself, but we lost the chance to use L1/L2 table
, allocated info, to accelerate it.

We've discussed dirty block tracking APIs on the list several times.
This seems related.

Maybe it's time to tackle this properly for both external and internal

The reason why a dirty block tracking API is also helpful is that not
all tools want to learn how to open different image file formats.  (Even
with libqblock.)

The drity block tracking API gives them information which they can use
together with a single interface like NBD or a libvirt block pread-style
interface to read out dirty blocks.

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.


Best Regards

Wenchao Xia

reply via email to

[Prev in Thread] Current Thread [Next in Thread]