qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [RFC] Intermediate block mirroring
Date: Thu, 9 Apr 2015 11:39:28 +0100	[thread overview]
Message-ID: <20150409103928.GB2783@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20150402132857.GA26513@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

On Thu, Apr 02, 2015 at 03:28:57PM +0200, 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.
> 
> A use case would be to move disk images across different storage
> backends.

The simple solution to that problem is:

Assumption: backing files are read only.  (True in most cases.)

1. Copy the backing files using cp(1) or another method.
2. Issue QMP 'change-backing-file' command so that [D] uses [X] instead
   of [C].

So it can be done today already.

Note that the management tool needs to enforce the assumption since QEMU
cannot know whether other programs or QEMU instances are modifying one
of the backing files.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2015-04-09 10:46 UTC|newest]

Thread overview: 6+ 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
2015-04-09 10:39 ` Stefan Hajnoczi [this message]
2015-04-09 12:40   ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2015-04-10  9:56     ` Stefan Hajnoczi
2015-04-10 13:02       ` Kevin Wolf

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=20150409103928.GB2783@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.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 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).