From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Vgf-0001Ba-Uh for qemu-devel@nongnu.org; Mon, 15 Jun 2015 10:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Vgd-0007pE-TU for qemu-devel@nongnu.org; Mon, 15 Jun 2015 10:48:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Vgd-0007op-Oc for qemu-devel@nongnu.org; Mon, 15 Jun 2015 10:48:31 -0400 Date: Mon, 15 Jun 2015 15:48:29 +0100 From: Stefan Hajnoczi Message-ID: <20150615144829.GA12553@stefanha-thinkpad.redhat.com> References: <1434103761-29871-1-git-send-email-stefanha@redhat.com> <1434103761-29871-5-git-send-email-stefanha@redhat.com> <557B5F97.5070701@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <557B5F97.5070701@redhat.com> Subject: Re: [Qemu-devel] [RFC 4/9] block: keep bitmap if incremental backup job is cancelled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: Kevin Wolf , famz@redhat.com, Jeff Cody , qemu-devel@nongnu.org, Max Reitz , vsementsov@parallels.com --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 12, 2015 at 06:39:19PM -0400, John Snow wrote: >=20 >=20 > On 06/12/2015 06:09 AM, Stefan Hajnoczi wrote: > > Reclaim the dirty bitmap if an incremental backup block job is > > cancelled. The ret variable may be 0 when the job is cancelled so it's > > not enough to check ret < 0. > >=20 > > Signed-off-by: Stefan Hajnoczi > > --- > > block/backup.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/block/backup.c b/block/backup.c > > index d3f648d..c1ad975 100644 > > --- a/block/backup.c > > +++ b/block/backup.c > > @@ -430,7 +430,7 @@ static void coroutine_fn backup_run(void *opaque) > > =20 > > if (job->sync_bitmap) { > > BdrvDirtyBitmap *bm; > > - if (ret < 0) { > > + if (ret < 0 || block_job_is_cancelled(&job->common)) { > > /* Merge the successor back into the parent, delete nothin= g. */ > > bm =3D bdrv_reclaim_dirty_bitmap(bs, job->sync_bitmap, NUL= L); > > assert(bm); > >=20 >=20 > Reviewed-by: John Snow Thanks, I'll send this patch separately and CC qemu-stable. --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVfuW9AAoJEJykq7OBq3PIiasH/jpjr1z++JDcMtcA8IqymmxO 6EQVpnEaTJYtoubKZ/szRyDJng3/BckeSM9quN57A6qjfaFfSWTqg9er7nI12yV5 iG2IrP9AfKcDqV8m185BmKENEJyW5Wj3cbnzgfvQ/2IAR4qXFN3/joCLpyPrbsGm ttlFOaFakcGMeKmABiEVLVX/v2HfKfQJm8pW2nZHLNEU/Q9l21naXS4b1nqX75ap GFO9KnwlTAdQzCORP1OzsimFBpGnYDsVTmjU6kdoRnW/wHNaS3DvFfy0p9ByRnO+ jkXOFYjPe4GFkmRkjOrC5R4KHf2pqJilHTS0q7NWax6enPowSbtrXH/aXY4ROqw= =qrBY -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--