From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkDpv-00012e-UD for qemu-devel@nongnu.org; Fri, 31 Oct 2014 11:10:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xk84z-0002Pa-R7 for qemu-devel@nongnu.org; Fri, 31 Oct 2014 05:01:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xk84z-0002PS-Kd for qemu-devel@nongnu.org; Fri, 31 Oct 2014 05:01:09 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9V918iL028722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 31 Oct 2014 05:01:08 -0400 Date: Fri, 31 Oct 2014 10:01:06 +0100 From: Kevin Wolf Message-ID: <20141031090106.GA4496@noname.str.redhat.com> References: <1410411902-7104-1-git-send-email-famz@redhat.com> <1410411902-7104-2-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1410411902-7104-2-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/3] qmp: Add command 'blockdev-backup' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster Am 11.09.2014 um 07:05 hat Fam Zheng geschrieben: > Similar to drive-backup, but this command uses a device id as target > instead of creating/opening an image file. > > Also add blocker on target bs, since the target is also a named device > now. > > Add check and report error for bs == target which became possible but is > an illegal case with introduction of blockdev-backup. > > Signed-off-by: Fam Zheng > diff --git a/qapi/block-core.json b/qapi/block-core.json > index a685d02..b953c7b 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -669,6 +669,40 @@ > '*on-target-error': 'BlockdevOnError' } } > > ## > +# @BlockdevBackup > +# > +# @device: the name of the device which should be copied. > +# > +# @target: the name of the backup target device. Both of these are either a BlockBackend ID or a BDS node-name, right? Do we have a standard way of expressing this? "name of the device" isn't quite clear. > +# @sync: what parts of the disk image should be copied to the destination > +# (all the disk, only the sectors allocated in the topmost image, or > +# only new I/O). > +# > +# @speed: #optional the maximum speed, in bytes per second. > +# > +# @on-source-error: #optional the action to take on an error on the source, > +# default 'report'. 'stop' and 'enospc' can only be used > +# if the block device supports io-status (see BlockInfo). > +# > +# @on-target-error: #optional the action to take on an error on the target, > +# default 'report' (no limitations, since this applies to > +# a different block device than @device). > +# > +# Note that @on-source-error and @on-target-error only affect background I/O. > +# If an error occurs during a guest write request, the device's rerror/werror > +# actions will be used. > +# > +# Since: 2.2 > +## > +{ 'type': 'BlockdevBackup', > + 'data': { 'device': 'str', 'target': 'str', > + 'sync': 'MirrorSyncMode', > + '*speed': 'int', > + '*on-source-error': 'BlockdevOnError', > + '*on-target-error': 'BlockdevOnError' } } Kevin