From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSWL-0006Fl-AF for qemu-devel@nongnu.org; Tue, 08 Oct 2013 04:20:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTSWF-0003EU-1v for qemu-devel@nongnu.org; Tue, 08 Oct 2013 04:19:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTSWE-0003EE-QW for qemu-devel@nongnu.org; Tue, 08 Oct 2013 04:19:50 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r988JkYB006613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Oct 2013 04:19:49 -0400 Date: Tue, 8 Oct 2013 16:08:37 +0800 From: Fam Zheng Message-ID: <20131008080837.GA30465@T430s.nay.redhat.com> References: <1380542578-2387-1-git-send-email-famz@redhat.com> <1380542578-2387-3-git-send-email-famz@redhat.com> <52498F7B.5010209@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52498F7B.5010209@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 2/7] qmp: add internal sync mode "common" to mirror_start Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@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