[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/9] hw/xen_disk: aio_inflight not released in handl
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 8/9] hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0 |
Date: |
Wed, 16 Mar 2011 11:48:00 +0100 |
From: Feiran Zheng <address@hidden>
In hw/xen_disk.c, async writing ioreq is leaked when
ioreq->req.nr_segments==0, because `aio_inflight` flag is not released
properly (skipped by misplaced "break").
Signed-off-by: Feiran Zheng <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/xen_disk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index ed9e5eb..445bf03 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -408,9 +408,9 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
break;
case BLKIF_OP_WRITE:
case BLKIF_OP_WRITE_BARRIER:
- ioreq->aio_inflight++;
if (!ioreq->req.nr_segments)
break;
+ ioreq->aio_inflight++;
bdrv_aio_writev(blkdev->bs, ioreq->start / BLOCK_SIZE,
&ioreq->v, ioreq->v.size / BLOCK_SIZE,
qemu_aio_complete, ioreq);
--
1.7.2.3
- [Qemu-devel] [PULL 0/9] Block patches, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 2/9] block/qcow: Don't ignore immediate read/write and other failures, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 1/9] block/vdi: Don't ignore immediate read/write failures, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 5/9] Don't allow multiwrites against a block device without underlying medium, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 3/9] Add error message for loading snapshot without VM state, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 4/9] tools: Use real async.c instead of stubs, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 6/9] Fix ATA SMART and CHECK POWER MODE, Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 7/9] Improve error handling in do_snapshot_blkdev(), Kevin Wolf, 2011/03/16
- [Qemu-devel] [PATCH 8/9] hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0,
Kevin Wolf <=
- [Qemu-devel] [PATCH 9/9] Add qcow2 documentation, Kevin Wolf, 2011/03/16
- [Qemu-devel] Re: [PULL 0/9] Block patches, Kevin Wolf, 2011/03/21