* [Qemu-devel] [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb
@ 2009-06-01 9:10 Dor Laor
2009-06-01 9:45 ` Christoph Hellwig
2009-06-23 12:39 ` Avi Kivity
0 siblings, 2 replies; 3+ messages in thread
From: Dor Laor @ 2009-06-01 9:10 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0001-Call-qemu_bh_delete-at-bdrv_aio_bh_cb.patch --]
[-- Type: text/plain, Size: 1135 bytes --]
>From 09ad82d8b8ebd1670aadf21eae8021dfad373c61 Mon Sep 17 00:00:00 2001
From: Dor Laor <dor@redhat.com>
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.
Signed-off-by: Dor Laor <dor@redhat.com>
---
block.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index c80d4b9..4a0b642 100644
--- a/block.c
+++ b/block.c
@@ -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);
}
--
1.5.6.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb
2009-06-01 9:10 [Qemu-devel] [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb Dor Laor
@ 2009-06-01 9:45 ` Christoph Hellwig
2009-06-23 12:39 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2009-06-01 9:45 UTC (permalink / raw)
To: Dor Laor; +Cc: qemu-devel
On Mon, Jun 01, 2009 at 12:10:02PM +0300, Dor Laor wrote:
>
> >From 09ad82d8b8ebd1670aadf21eae8021dfad373c61 Mon Sep 17 00:00:00 2001
> From: Dor Laor <dor@redhat.com>
> 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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb
2009-06-01 9:10 [Qemu-devel] [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb Dor Laor
2009-06-01 9:45 ` Christoph Hellwig
@ 2009-06-23 12:39 ` Avi Kivity
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-06-23 12:39 UTC (permalink / raw)
To: dlaor; +Cc: qemu-devel
On 06/01/2009 12:10 PM, Dor Laor wrote:
> 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.
>
This breaks vmdk. Qemu hangs while starting up. Trying to see why.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-23 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-01 9:10 [Qemu-devel] [PATCH] Call qemu_bh_delete at bdrv_aio_bh_cb Dor Laor
2009-06-01 9:45 ` Christoph Hellwig
2009-06-23 12:39 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).