WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [qemu-xen-3.4-testing] block: Clean up after deleting BH

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-3.4-testing] block: Clean up after deleting BHs
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 20 Oct 2009 05:07:21 -0700
Delivery-date: Tue, 20 Oct 2009 05:07:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit db34a17dce954b14efe2899ce5be0bcb3f06e512
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Wed Oct 7 15:57:18 2009 +0100

    block: Clean up after deleting BHs
    
    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@xxxxxxxxxx>
    Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
    
    [ Backported from 6bbff9a0b495918309074ac60375be5f9dc868b3
      by Stefano Stabellini. ]
    
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    (cherry picked from commit a05958b6e32f1748ea70b1efca13394956c0698b)
---
 block.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index bad2d3d..88e70d3 100644
--- a/block.c
+++ b/block.c
@@ -1523,6 +1523,7 @@ static void bdrv_aio_bh_cb(void *opaque)
     BlockDriverAIOCBSync *acb = opaque;
     acb->common.cb(acb->common.opaque, acb->ret);
     qemu_bh_delete(acb->bh);
+    acb->bh = NULL;
     qemu_aio_release(acb);
 }
 
@@ -1562,6 +1563,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);
 }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-3.4-testing.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-3.4-testing] block: Clean up after deleting BHs, Ian Jackson <=