qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4 2/7] qmp: add internal sync mode "common" to mirror_start
Date: Tue, 8 Oct 2013 16:08:37 +0800	[thread overview]
Message-ID: <20131008080837.GA30465@T430s.nay.redhat.com> (raw)
In-Reply-To: <52498F7B.5010209@redhat.com>

On Mon, 09/30 08:49, Eric Blake wrote:
> On 09/30/2013 06:02 AM, Fam Zheng wrote:
> > This adds a new sync mode "common" which only copies data that is above
> > the common ancestor of source and target. In general, this could be useful
> > in cases like:
> > 
> >     base_bs ---> common_ancestor ---> foo ---> bar --->source
> >                                   \
> >                                    \---> target
> > 
> > Where data in foo, bar and source will be copied to target, once such
> > common backing_hd sharing is introduced. For now, we could use a special
> > case: If target is the ancestor of source, like,
> > 
> >     base_bs ---> target ---> foo ---> bar --->source
> > 
> > The data in foo, bar and source will be copied to target, like
> > drive-commit, and when they are synced, the source bs replaces target
> > bs. This is specifically useful for block commit of active layer.
> > 
> > This mode is not available (-ENOTSUP) from QMP interface, it is only
> > used internally by block commit code.
> > 
> 
> > +++ b/qapi-schema.json
> > @@ -1363,7 +1363,7 @@
> >  # Since: 1.3
> >  ##
> >  { 'enum': 'MirrorSyncMode',
> > -  'data': ['top', 'full', 'none'] }
> > +  'data': ['top', 'full', 'none', 'common'] }
> 
> Is it worth documenting the mode, in order to include a '(since 1.7)'
> notation, as well as a mention that this mode is not supported via QMP
> but only exists so that the code generator will support the mode needed
> internally?  Is there any way to refactor things so that you don't have
> to munge the QAPI just to provide this internal-only mode?
> 

As described in commit message, this mode could be useful once blockdev-add has
device referencing (backing_hd sharing). For now, even with the same backing
file, they don't share BDS, so it's not working as expected and should be
disabled.

So do you think it OK to document as "not implemented" for now, and wait for
backing_hd sharing to enable it?

Thanks,

Fam

  reply	other threads:[~2013-10-08  8:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 12:02 [Qemu-devel] [PATCH v4 0/7] block: allow commit active as top Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 1/7] block: add bdrv_common_ancestor() Fam Zheng
2013-09-30 21:40   ` Eric Blake
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 2/7] qmp: add internal sync mode "common" to mirror_start Fam Zheng
2013-09-30 14:49   ` Eric Blake
2013-10-08  8:08     ` Fam Zheng [this message]
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 3/7] mirror: don't close target Fam Zheng
2013-10-01 17:11   ` Eric Blake
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 4/7] mirror: Add commit_job_type to perform commit with mirror code Fam Zheng
2013-10-01 17:13   ` Eric Blake
2013-10-08  8:37     ` Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 5/7] commit: support commit active layer Fam Zheng
2013-09-30 12:16   ` Paolo Bonzini
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 6/7] commit: remove unused check Fam Zheng
2013-09-30 12:17   ` Paolo Bonzini
2013-10-08  9:32     ` Fam Zheng
2013-09-30 12:02 ` [Qemu-devel] [PATCH v4 7/7] qemu-iotests: update test cases for commit active Fam Zheng

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=20131008080837.GA30465@T430s.nay.redhat.com \
    --to=famz@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --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 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).