From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Intermediate block mirroring
Date: Thu, 02 Apr 2015 10:56:09 -0600 [thread overview]
Message-ID: <551D74A9.9020306@redhat.com> (raw)
In-Reply-To: <20150402132857.GA26513@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 3110 bytes --]
On 04/02/2015 07:28 AM, Alberto Garcia wrote:
> Hi,
>
> I'm interested in adding the possibility to mirror an intermediate
> node in a disk image chain, but I would like to have some feedback
> before sending any patches.
>
> The goal would be to convert this:
>
> [A] -> [B] -> [C] -> [D]
>
> into this:
>
> [A] -> [B] -> [X] -> [D]
>
> where [D] is the active image and [X] would be a copy of [C]. The
> latter would be unlinked from the chain.
Seems useful, if for no other reason than to be another tool in the
arsenal of low-level manipulations that can be strung together for cool
high-level operations.
>
> A use case would be to move disk images across different storage
> backends.
>
> My idea is to extend the drive-mirror command. Similar to what we
> discussed in the case of the intermediate block streaming, I can reuse
> the 'device' parameter to refer to a node name. So the API doesn't
> need any changes other than the extended semantics for this parameter.
>
> One difference with the current functionality is that once the block
> job is completed, the node above the mirrored one would have to change
> its backing image to point to the new one. One solution is to iterate
> over all devices (bdrv_next()) and check which ones are connected
> directly or indirectly to the mirrored node (bdrv_find_overlay()).
>
> drive-mirror has three different sync modes: top, full and none. This
> would be the chain from the example using each one of these modes:
>
> top:
>
> [A] -> [B] -> [X] -> [D]
That is, X becomes the mirror of C, and then a later command lets us
rebase D onto X (since we know the guest-visible contents accessible
from X and C are identical).
>
> full:
>
> [X] -> [D]
That is, X becomes the mirror of the full chain A through C, and then a
later command lets us rebase D onto X (since we know the guest-visible
contents accessible from X and C are identical).
>
> none:
>
> [A] -> [B] -> [C] -> [X] -> [D]
That is, X becomes a new file that tracks changes made since a point in
time which are also going into C; and if we desire we can issue a later
command to rebase D onto X (since we know the guest-visible contents
accessible from X and C are identical at that time), and even later
start cleaning up C (we could use dirty bitmaps to see what got moved
into X to clean those sectors out of C and reduce its size)
>
> My understanding is that in the 'sync=full' case, [A] and [B] would
> also need to be blocked during the operation since they are going to
> disappear from the chain.
>
> I have some code and in principle everything seems to be working fine,
> but I'd like to test it a bit more.
>
> What's anyway your opinion about this proposal?
Certainly seems like something worth having. The devil may be in the
details, but we can get there when you post proposed patches.
>
> Thanks,
>
> Berto
>
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2015-04-02 16:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 13:28 [Qemu-devel] [RFC] Intermediate block mirroring Alberto Garcia
2015-04-02 16:56 ` Eric Blake [this message]
2015-04-09 10:39 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-09 12:40 ` Alberto Garcia
2015-04-10 9:56 ` Stefan Hajnoczi
2015-04-10 13:02 ` Kevin Wolf
-- strict thread matches above, loose matches on Subject: below --
2018-04-12 17:07 [Qemu-devel] " Alberto Garcia
2018-04-13 14:23 ` Max Reitz
2018-04-16 14:59 ` Alberto Garcia
2018-04-16 15:15 ` Max Reitz
2018-04-18 15:34 ` Alberto Garcia
2018-04-20 13:13 ` Max Reitz
2018-04-25 12:58 ` Alberto Garcia
2018-04-25 13:06 ` Max Reitz
2018-04-25 13:42 ` Alberto Garcia
2018-04-25 14:03 ` Max Reitz
2018-05-02 13:07 ` Alberto Garcia
2018-05-02 14:12 ` Max Reitz
2018-05-03 10:32 ` Alberto Garcia
2018-05-03 12:22 ` Kevin Wolf
2018-05-03 12:33 ` Alberto Garcia
2018-05-09 14:22 ` Alberto Garcia
2018-06-01 10:51 ` Alberto Garcia
2018-06-11 12:20 ` Kevin Wolf
2018-06-11 12:23 ` Alberto Garcia
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=551D74A9.9020306@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.