qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: Clean up after deleting BHs
@ 2009-06-23 13:20 Avi Kivity
  2009-06-23 13:37 ` Filip Navara
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Avi Kivity @ 2009-06-23 13:20 UTC (permalink / raw)
  To: qemu-devel

Commit 6a7ad299 ("Call qemu_bh_delete at bdrv_aio_bh_cb") deletes emulated
aio bottom halves to prevent endless accumulation.  However, it leaves a
stale ->bh pointer, which is then waited on when the aio is reused.

Zeroing the pointer fixes the issue, allowing vmdk format images to be used.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 block.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index aca5a6d..cefbe77 100644
--- a/block.c
+++ b/block.c
@@ -1374,6 +1374,7 @@ static void bdrv_aio_cancel_em(BlockDriverAIOCB *blockacb)
 {
     BlockDriverAIOCBSync *acb = (BlockDriverAIOCBSync *)blockacb;
     qemu_bh_delete(acb->bh);
+    acb->bh = NULL;
     qemu_aio_release(acb);
 }
 
@@ -1391,6 +1392,7 @@ static void bdrv_aio_bh_cb(void *opaque)
     qemu_vfree(acb->bounce);
     acb->common.cb(acb->common.opaque, acb->ret);
     qemu_bh_delete(acb->bh);
+    acb->bh = NULL;
     qemu_aio_release(acb);
 }
 
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-06-24 18:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23 13:20 [Qemu-devel] [PATCH] block: Clean up after deleting BHs Avi Kivity
2009-06-23 13:37 ` Filip Navara
2009-06-23 16:50 ` Christoph Hellwig
2009-06-23 16:57   ` Avi Kivity
2009-06-23 18:08     ` Filip Navara
2009-06-23 18:11       ` Avi Kivity
2009-06-23 18:26     ` Christoph Hellwig
2009-06-23 18:31       ` Avi Kivity
2009-06-23 19:41         ` Christoph Hellwig
2009-06-23 19:50           ` Avi Kivity
2009-06-23 20:21       ` Filip Navara
2009-06-24 18:31 ` Stefan Weil

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).