qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: famz@redhat.com
Cc: Stefan Hajnoczi <stefanha@gmail.com>, Ian Main <imain@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V1 1/2] Implement sync modes for drive-backup.
Date: Mon, 15 Jul 2013 12:50:39 +0200	[thread overview]
Message-ID: <51E3D3FF.1060309@redhat.com> (raw)
In-Reply-To: <20130708092150.GA11838@T430s.redhat.com>

Il 08/07/2013 11:21, Fam Zheng ha scritto:
> > Should the source be "bs" for MIRROR_SYNC_MODE_NONE?  Also in this case
> > you may want to default the format to "qcow2" instead of bs's format.
> 
> Maybe not. "source" only affects when sync=top below here. For reading
> the uncopied for target from source, we can't simply assign it to "bs"
> for sync=none and create the new image with with bs->filename as backing
> file, because that way we don't know how to open it with what we have
> now: the backing file is already opened RW (as "bs").

But if we do not set the source, how can you read at all from the
temporary backup destination?

If I read the code correctly, target_bs should be opened with
BDRV_O_NO_BACKING, and then you should set target_bs->backing_hd = bs.
Which in turn would only work for a format that supports backing files
(such as qcow2).

I'm not sure how the "none" mode works with these patches.  It's quite
possible I'm wrong, of course, but then the explanation should be in the
code or the commit message.  It should be in the code or the commit
message even if my suggestions are applied. :)

Paolo

  reply	other threads:[~2013-07-15 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28  2:28 [Qemu-devel] [PATCH V1 0/2] Implement sync modes for drive-backup Ian Main
2013-06-28  2:28 ` [Qemu-devel] [PATCH V1 1/2] " Ian Main
2013-07-01 12:16   ` Paolo Bonzini
2013-07-03 18:14     ` Ian Main
2013-07-04  7:45       ` Paolo Bonzini
2013-07-08  9:21     ` Fam Zheng
2013-07-15 10:50       ` Paolo Bonzini [this message]
2013-07-15 17:49         ` Ian Main
2013-07-15 20:47           ` Paolo Bonzini
2013-07-16 18:17             ` Ian Main
2013-06-28  2:28 ` [Qemu-devel] [PATCH V1 2/2] Add tests for sync modes 'TOP' and 'NONE' Ian Main
2013-07-04 13:20   ` Stefan Hajnoczi

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=51E3D3FF.1060309@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=imain@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).