From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W65R0-00044o-8z for qemu-devel@nongnu.org; Wed, 22 Jan 2014 16:34:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W65Qv-0007Lq-7t for qemu-devel@nongnu.org; Wed, 22 Jan 2014 16:34:06 -0500 Received: from paradis.irqsave.net ([62.212.105.220]:48092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W65Qu-0007Ku-Tf for qemu-devel@nongnu.org; Wed, 22 Jan 2014 16:34:01 -0500 Date: Wed, 22 Jan 2014 22:33:59 +0100 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140122213358.GA4196@irqsave.net> References: <1386862440-8003-1-git-send-email-benoit@irqsave.net> <1386862440-8003-8-git-send-email-benoit@irqsave.net> <20140121142849.GL3307@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140121142849.GL3307@dhcp-200-207.str.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V5 7/7] qmp: Allow to take external snapshots on bs graphs node. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: famz@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com Le Tuesday 21 Jan 2014 =E0 15:28:49 (+0100), Kevin Wolf a =E9crit : > Am 12.12.2013 um 16:34 hat Beno=EEt Canet geschrieben: > > Signed-off-by: Benoit Canet > > --- > > blockdev.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++= ++------- > > hmp.c | 4 +++- > > qapi-schema.json | 13 ++++++++++--- > > qmp-commands.hx | 11 ++++++++++- > > 4 files changed, 71 insertions(+), 12 deletions(-) >=20 > > diff --git a/qapi-schema.json b/qapi-schema.json > > index 3977619..d7afb69 100644 > > --- a/qapi-schema.json > > +++ b/qapi-schema.json > > @@ -1759,18 +1759,25 @@ > > ## > > # @BlockdevSnapshot > > # > > -# @device: the name of the device to generate the snapshot from. > > +# Either @device or @node-name must be set but not both. > > +# > > +# @device: #optional the name of the device to generate the snapshot= from. > > +# > > +# @node-name: #optional graph node name to generate the snapshot fro= m (Since 2.0) > > # > > # @snapshot-file: the target of the new image. A new file will be cr= eated. > > # > > +# @snapshot-node-name: #optional the graph node name of the new imag= e (Since 2.0) > > +# >=20 > I think we should document how this plays together with snapshot-file, > format and mode. What kind of interactions do you expect ? The only kind of interaction I see is that setting node-name imply that t= he user really want to manipulate the graph and that snapshot-node-name is mandatory as a consequence. >=20 > Perhaps this is actually different enough that it would justify creatin= g > a new QMP command 'blockdev-snapshot' that never creates image files bu= t > only ever takes existing nodes. The implementation of 'blockdev-snapsho= t- > sync' could then become a wrapper around it. What would be the benefits ? Best regards Beno=EEt >=20 > > # @format: #optional the format of the snapshot image, default is 'q= cow2'. > > # > > # @mode: #optional whether and how QEMU should create a new image, d= efault is > > # 'absolute-paths'. > > ## > > { 'type': 'BlockdevSnapshot', > > - 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str= ', > > - '*mode': 'NewImageMode' } } > > + 'data': { '*device': 'str', '*node-name': 'str', > > + 'snapshot-file': 'str', '*snapshot-node-name': 'str', > > + '*format': 'str', '*mode': 'NewImageMode' } } > > =20 > > ## > > # @BlockdevSnapshotInternal >=20 > Kevin