From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTZLB-0005HS-Ha for qemu-devel@nongnu.org; Mon, 15 Sep 2014 12:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTZL2-00076e-FC for qemu-devel@nongnu.org; Mon, 15 Sep 2014 12:41:25 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:39336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTZL2-00076X-8g for qemu-devel@nongnu.org; Mon, 15 Sep 2014 12:41:16 -0400 Received: by mail-wi0-f176.google.com with SMTP id ex7so4633306wid.15 for ; Mon, 15 Sep 2014 09:41:14 -0700 (PDT) Date: Mon, 15 Sep 2014 17:41:11 +0100 From: Stefan Hajnoczi Message-ID: <20140915164111.GG32379@stefanha-thinkpad.redhat.com> References: <1410414088-4419-1-git-send-email-famz@redhat.com> <1410414088-4419-12-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Y+xroYBkGM9OatJL" Content-Disposition: inline In-Reply-To: <1410414088-4419-12-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 11/22] blkdebug: Drop blkdebug_aiocb_info.cancel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , Benoit Canet , Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini , Liu Yuan --Y+xroYBkGM9OatJL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 11, 2014 at 01:41:17PM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > block/blkdebug.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) >=20 > diff --git a/block/blkdebug.c b/block/blkdebug.c > index 69b330e..08131b3 100644 > --- a/block/blkdebug.c > +++ b/block/blkdebug.c > @@ -52,11 +52,8 @@ typedef struct BlkdebugSuspendedReq { > QLIST_ENTRY(BlkdebugSuspendedReq) next; > } BlkdebugSuspendedReq; > =20 > -static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb); > - > static const AIOCBInfo blkdebug_aiocb_info =3D { > - .aiocb_size =3D sizeof(BlkdebugAIOCB), > - .cancel =3D blkdebug_aio_cancel, > + .aiocb_size =3D sizeof(BlkdebugAIOCB), > }; > =20 > enum { > @@ -450,16 +447,6 @@ static void error_callback_bh(void *opaque) > qemu_aio_release(acb); > } > =20 > -static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb) > -{ > - BlkdebugAIOCB *acb =3D container_of(blockacb, BlkdebugAIOCB, common); > - if (acb->bh) { > - qemu_bh_delete(acb->bh); > - acb->bh =3D NULL; > - } > - qemu_aio_release(acb); > -} > - This changes cancel behavior a bit. Instead of deleting the BH and ending the request early we now always wait for it to complete. It would have been nice to include rationale in the commit description but I remember looking at the blkdebug.c code and not being sure whether blkdebug_aio_cancel() is ever really needed anyway. So I guess this is fine... Stefan --Y+xroYBkGM9OatJL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUFxanAAoJEJykq7OBq3PIM04H/3ZFHTBdoer/tpTkvxF4qGP2 8mFEzY56J43Zqhok3tdgfZf1DuONV+/l+gyBoXhoSqFcY6tOjWNJllKzkdRafgrL ZbIHgA/B2cghluB866X+5nnLb5y2hMx2YMO3u+iGbwWzQUDAW79UwVwKr/SGtfjT QtpaetUWVNc7Ua3Oe/8OxBOGIJCRb37m+Jpr94iG37b/RGARABcpx+ya6FNMbo7g Dnolr8oIPgUtMoXuNq9rECGA7CHDJgiL+FHsgjDycRPXT1t8vX5oyFgv9BiVHGjV clQHdLIwiaDhBbwqWSR8TRTwr+hrZOyMuc1WQrEb2tyVl0L5ZCKt9wLDd5wZv2U= =MdnW -----END PGP SIGNATURE----- --Y+xroYBkGM9OatJL--