From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP8xw-0006Ym-EB for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:43:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP8xq-0004Zq-B0 for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:43:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP8xq-0004Zm-3o for qemu-devel@nongnu.org; Wed, 03 Sep 2014 07:43:02 -0400 Message-ID: <5406FEB4.9000001@redhat.com> Date: Wed, 03 Sep 2014 13:42:44 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1409743435-21155-1-git-send-email-famz@redhat.com> <1409743435-21155-12-git-send-email-famz@redhat.com> In-Reply-To: <1409743435-21155-12-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 11/20] blkdebug: Convert blkdebug_aiocb_info.cancel to .cancel_async List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Chrysostomos Nanakos , Stefan Hajnoczi , Peter Lieven , Ronnie Sahlberg , Liu Yuan , Josh Durgin , MORITA Kazutaka , Benoit Canet Il 03/09/2014 13:23, Fam Zheng ha scritto: > static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb) > { > BlkdebugAIOCB *acb = container_of(blockacb, BlkdebugAIOCB, common); > + acb->ret = -ECANCELED; > + acb->common.cb(acb->common.opaque, acb->ret); > if (acb->bh) { > qemu_bh_delete(acb->bh); > acb->bh = NULL; I think you shouldn't invoke the callback here, and instead you can just let the bottom half do the work. Actually, a no-op implementation of blkdebug_aio_cancel would work. Paolo