qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 2/7] qmp: add internal sync mode "common" to


From: Fam Zheng
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
User-agent: Mutt/1.5.21 (2010-09-15)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]