From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z86cv-0005nu-E9 for qemu-devel@nongnu.org; Thu, 25 Jun 2015 08:51:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z86cs-0004dw-4G for qemu-devel@nongnu.org; Thu, 25 Jun 2015 08:51:33 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:38735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z86cr-0004de-TP for qemu-devel@nongnu.org; Thu, 25 Jun 2015 08:51:30 -0400 Received: by wibdq8 with SMTP id dq8so74954789wib.1 for ; Thu, 25 Jun 2015 05:51:29 -0700 (PDT) Date: Thu, 25 Jun 2015 13:51:26 +0100 From: Stefan Hajnoczi Message-ID: <20150625125126.GE4419@stefanha-thinkpad.redhat.com> References: <1434103761-29871-1-git-send-email-stefanha@redhat.com> <1434103761-29871-5-git-send-email-stefanha@redhat.com> <558AEA49.8050808@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SNIs70sCzqvszXB4" Content-Disposition: inline In-Reply-To: <558AEA49.8050808@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: Max Reitz Cc: Kevin Wolf , famz@redhat.com, Jeff Cody , qemu-devel@nongnu.org, vsementsov@parallels.com, Stefan Hajnoczi , John Snow --SNIs70sCzqvszXB4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 24, 2015 at 07:35:05PM +0200, Max Reitz wrote: > On 12.06.2015 12:09, 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. > > > >Signed-off-by: Stefan Hajnoczi > >--- > > block/backup.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >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) > > 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 > Since I can't find a seperate patch on qemu-devel or qemu-block yet: >=20 > Reviewed-by: Max Reitz Thanks, I must have gotten distracted before sending the email. --SNIs70sCzqvszXB4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVi/lOAAoJEJykq7OBq3PItfMH/0ylZrzDOUis4pK1yH8xwEN3 bSaN2EEsFoqLLrGbwea0ZXcCl6aojaxDXjQYqTaFysnHL00mQh6zEN3ktUEYCiWy GhlsJdHv8hU/CNwd2Oh7akDMi2ePAiTDY1xkBPN4jwKmlM92kDduHw49b35htWR4 LuQC40QluzilzdTVOxBIPa3TRLzZJNSux6asASB4od1/QFHY6gjarmuxyWmEFQxH e7ex2D7O72wTBc/oGatMu7S2YRi8ZTg6G27+TvC+Wu0uZPYd2hfH/J9Vc04QnhBP m8CtFdSqmgJAuS+pyZ4klbm9c2V+UGcG3dxHWg0kwyFHAX2Hp5h6J63RHEM+xD4= =kf0i -----END PGP SIGNATURE----- --SNIs70sCzqvszXB4--