Call qemu_bh_delete at bdrv_aio_bh_cb
PATCH 1/1 Call qemu_bh_delete at bdrv_aio_bh_cb
Quoted 1 line
From
09ad82d8b8ebd1670aadf21eae8021dfad373c61Mon Sep 17 00:00:00 2001
From: Dor Laor <[email protected]>
Date: Mon, 1 Jun 2009 12:07:23 +0300
Subject: [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb.
Also replave qemu_bh_cancel with qemu_bh_delete in bdrv_aio_cancel_em. Otherwise the bh will live forever in the bh list.
--- block.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
block.c +2 -2
@@ -1402,7 +1402,7 @@ static void bdrv_aio_bh_cb(void *opaque)qemu_iovec_from_buffer (acb->qiov, acb->bounce, acb->qiov->size);qemu_vfree (acb->bounce); acb->common.cb (acb->common.opaque, acb->ret); - +qemu_bh_delete (acb->bh);qemu_aio_release (acb); }
@@ -1455,7 +1455,7 @@ static BlockDriverAIOCB *bdrv_aio_writev_em(BlockDriverState *bs,static void bdrv_aio_cancel_em (BlockDriverAIOCB *blockacb) {BlockDriverAIOCBSync *acb = (BlockDriverAIOCBSync *)blockacb; -qemu_bh_cancel (acb->bh); +qemu_bh_delete (acb->bh);qemu_aio_release (acb); }
Signature · 1 line
1.5.6.6
Quoted 8 lines · Dor Laor
Quoted 3 lines
From
09ad82d8b8ebd1670aadf21eae8021dfad373c61Mon Sep 17 00:00:00 2001From: Dor Laor <[email protected]>
Date: Mon, 1 Jun 2009 12:07:23 +0300
Subject: [PATCH] Callqemu_bh_deleteatbdrv_aio_bh_cb.
Also replaveqemu_bh_cancelwithqemu_bh_deleteinbdrv_aio_cancel_em. Otherwise the bh will live forever in the bh list.
Looks good to me. Those lifetime rules for QEMUBH objects look quite awfull to me, though - but this whole don't directly free objects but rather wait for $event (or forever) scheme seems pretty common in qemu.
Quoted 4 lines · Dor Laor
Subject: [PATCH] Call
qemu_bh_deleteatbdrv_aio_bh_cb.
Also replaveqemu_bh_cancelwithqemu_bh_deleteinbdrv_aio_cancel_em. Otherwise the bh will live forever in the bh list.
This breaks vmdk. Qemu hangs while starting up. Trying to see why.
Signature · 1 line
error compiling committee.c: too many arguments to function