From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEjiD-0002f5-Bs for qemu-devel@nongnu.org; Mon, 13 Jul 2015 15:48:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEji9-0001pu-BP for qemu-devel@nongnu.org; Mon, 13 Jul 2015 15:48:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEji9-0001pe-6M for qemu-devel@nongnu.org; Mon, 13 Jul 2015 15:48:21 -0400 Message-ID: <55A41603.80301@redhat.com> Date: Mon, 13 Jul 2015 15:48:19 -0400 From: John Snow MIME-Version: 1.0 References: <1436500012-32593-1-git-send-email-famz@redhat.com> <1436500012-32593-5-git-send-email-famz@redhat.com> In-Reply-To: <1436500012-32593-5-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 04/15] block: keep bitmap if incremental backup job is cancelled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , vsementsov@parallels.com, stefanha@redhat.com, Max Reitz On 07/09/2015 11:46 PM, Fam Zheng wrote: > From: Stefan Hajnoczi >=20 > 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 > Reviewed-by: Fam Zheng > Signed-off-by: Fam Zheng > --- > block/backup.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/block/backup.c b/block/backup.c > index d3c7d9f..965654d 100644 > --- a/block/backup.c > +++ b/block/backup.c > @@ -431,7 +431,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 Jeff Cody should've merged this one by now, but I guess he hasn't sent a pull request for it yet. This should be in 2.4, I think. --js