All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [RFC] Intermediate block mirroring
Date: Thu, 12 Apr 2018 19:07:11 +0200	[thread overview]
Message-ID: <20180412170711.GA6240@igalia.com> (raw)

Hello,

I mentioned this some time ago, but I'd like to retake it now: I'm
checking how to copy arbitrary nodes on a backing chain, so if I have
e.g.

   [A] <- [B] <- [C] <- [D]

I'd like to end up with

   [A] <- [E] <- [C] <- [D]

where [E] is a copy of [B]. The most obvious use case is to move [B]
to a different storage backend.

At the moment we can already copy [B] into [E] (outside QEMU) and then
do

   change-backing-file device=[D] image-node-name=[C] backing-file=[E]

However this only changes the image on disk and the bs->backing_file
string in memory. QEMU keeps using the [B] BlockDriverState, and we
need to make it switch to [E].

One possible way to do this would be to modify blockdev-mirror so the
source image can be located anywhere on a chain. Currently there's
bs->backing_blocker preventing that, plus qmp_blockdev_mirror()
refuses to take any non-root source node. Other than permission
changes I don't think the algorithm itself needs any additional
modification, although I suppose we'd like to change the backing file
as part of the same job, and that would require API changes.

One other way is to have a more generic replace-node command which
would call bdrv_replace_node(), but I don't know if we want to expose
that and I don't have any other use case for it at the moment.

Opinions, comments?

Berto

             reply	other threads:[~2018-04-12 17:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 17:07 Alberto Garcia [this message]
2018-04-13 14:23 ` [Qemu-devel] [RFC] Intermediate block mirroring 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
  -- strict thread matches above, loose matches on Subject: below --
2015-04-02 13:28 Alberto Garcia
2015-04-02 16:56 ` Eric Blake

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=20180412170711.GA6240@igalia.com \
    --to=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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 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.