From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbrST-0005S5-5O for qemu-devel@nongnu.org; Tue, 15 Sep 2015 10:43:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbrSO-0005r5-Pl for qemu-devel@nongnu.org; Tue, 15 Sep 2015 10:43:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbrSO-0005qy-IB for qemu-devel@nongnu.org; Tue, 15 Sep 2015 10:43:40 -0400 References: <1442297513-7001-1-git-send-email-famz@redhat.com> <1442297513-7001-12-git-send-email-famz@redhat.com> From: Eric Blake Message-ID: <55F82E9A.2040900@redhat.com> Date: Tue, 15 Sep 2015 08:43:38 -0600 MIME-Version: 1.0 In-Reply-To: <1442297513-7001-12-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sDWUAPTRAvmqFu03tx9goHhs5WaDgFMk6" Subject: Re: [Qemu-devel] [PATCH v6 11/14] block/backup: support block job transactions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , Max Reitz , vsementsov@parallels.com, stefanha@redhat.com, John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sDWUAPTRAvmqFu03tx9goHhs5WaDgFMk6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/15/2015 12:11 AM, Fam Zheng wrote: > From: Stefan Hajnoczi >=20 > Join the transaction when the 'transactional-cancel' QMP argument is > true. >=20 > This ensures that the sync bitmap is not thrown away if another block > job in the transaction is cancelled or fails. This is critical so > incremental backup with multiple disks can be retried in case of > cancellation/failure. >=20 > Signed-off-by: Stefan Hajnoczi > Signed-off-by: Fam Zheng > --- > block/backup.c | 25 +++++++-- > blockdev.c | 132 +++++++++++++++++++++++++++++++++++---= -------- > include/block/block_int.h | 3 +- > qapi-schema.json | 4 +- > qapi/block-core.json | 29 ++++++++++ > 5 files changed, 155 insertions(+), 38 deletions(-) >=20 > +++ b/qapi/block-core.json > @@ -736,6 +736,11 @@ > # default 'report' (no limitations, since this appli= es to > # a different block device than @device). > # > +# @transactional-cancel: #optional whether failure or cancellation of = other > +# block jobs with @transactional-cancel true in= the same > +# transaction causes the whole group to cancel.= > +# (Since 2.5) > +# Spurious hunk here. > @@ -750,6 +755,18 @@ > '*on-target-error': 'BlockdevOnError' } } > =20 > ## > +# @DriveBackupTxn > +# > +# @transactional-cancel: #optional whether failure or cancellation of = other > +# block jobs with @transactional-cancel true in= the same > +# transaction causes the whole group to cancel.= > +# Maybe mention default false here... > +# Since: 2.5 > +## > +{ 'struct': 'DriveBackupTxn', 'base': 'DriveBackup', > + 'data': {'*transactional-cancel': 'bool' } } > + > +## > # @BlockdevBackup > # > # @device: the name of the device which should be copied. > @@ -785,6 +802,18 @@ > '*on-target-error': 'BlockdevOnError' } } > =20 > ## > +# @BlockdevBackupTxn > +# > +# @transactional-cancel: #optional whether failure or cancellation of = other > +# block jobs with @transactional-cancel true in= the same > +# transaction causes the whole group to cancel.= and again here. With those three fixes, Reviewed-by: Eric Blake (and we can simplify it later when more qapi patches land) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --sDWUAPTRAvmqFu03tx9goHhs5WaDgFMk6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV+C6aAAoJEKeha0olJ0NqpH8IAI/JhvomwHUv1IWpyobhRUDs U3yIRsD+ITpGynUFg2BLwm+e+6hIRpHJSuqM9YC9rwWFwQUzWclK26hZi1j4Rbup hewIKomC28uTwzYL4xYIjG0SuTQcE4THaOspz8n9STLjSOAZHoxGRcwYNIwXHPCt Xat2aF3D64Kr7laQgfmHnjoSBjS6soua1szp9PQ/dcp1ZHR1W3gwDpDZUyMIfVGW ZEyufD3djI/NkGCOOcJzRCZzoUxApkGisAfORTgCimwmu0TkivGFZPi2pI0YHgtA dJNeYT0poBYQUKI+LWsV8PR3uQk4sw22Q+dRSrWjehod0r//bl0FPIDz4nC2DIM= =VNh3 -----END PGP SIGNATURE----- --sDWUAPTRAvmqFu03tx9goHhs5WaDgFMk6--