qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0
@ 2011-03-09 13:19 Feiran Zheng
  2011-03-09 14:42 ` [Qemu-devel] " Stefano Stabellini
  2011-03-09 15:54 ` [Qemu-devel] " Kevin Wolf
  0 siblings, 2 replies; 4+ messages in thread
From: Feiran Zheng @ 2011-03-09 13:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: anthony.perard, Gerd Hoffmann, Stefano Stabellini

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 <famcool@gmail.com>
---
 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);

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

* [Qemu-devel] Re: [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0
  2011-03-09 13:19 [Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0 Feiran Zheng
@ 2011-03-09 14:42 ` Stefano Stabellini
  2011-03-09 15:01   ` Stefan Hajnoczi
  2011-03-09 15:54 ` [Qemu-devel] " Kevin Wolf
  1 sibling, 1 reply; 4+ messages in thread
From: Stefano Stabellini @ 2011-03-09 14:42 UTC (permalink / raw)
  To: Feiran Zheng
  Cc: Anthony Perard, xen-devel, Stefano Stabellini,
	qemu-devel@nongnu.org, Gerd Hoffmann

On Wed, 9 Mar 2011, Feiran Zheng wrote:
> 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 <famcool@gmail.com>

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

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

* Re: [Qemu-devel] Re: [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0
  2011-03-09 14:42 ` [Qemu-devel] " Stefano Stabellini
@ 2011-03-09 15:01   ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2011-03-09 15:01 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: xen-devel, Stefano Stabellini, qemu-devel@nongnu.org,
	Feiran Zheng, Gerd Hoffmann, Anthony Perard

On Wed, Mar 9, 2011 at 2:42 PM, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
> On Wed, 9 Mar 2011, Feiran Zheng wrote:
>> 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 <famcool@gmail.com>
>
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Included Kevin so this can be taken up into the block subsystem branch.

Stefan

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

* Re: [Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0
  2011-03-09 13:19 [Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0 Feiran Zheng
  2011-03-09 14:42 ` [Qemu-devel] " Stefano Stabellini
@ 2011-03-09 15:54 ` Kevin Wolf
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2011-03-09 15:54 UTC (permalink / raw)
  To: Feiran Zheng
  Cc: anthony.perard, Stefano Stabellini, qemu-devel, Gerd Hoffmann

Am 09.03.2011 14:19, schrieb Feiran Zheng:
> 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 <famcool@gmail.com>

Thanks, applied to the block branch.

Kevin

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

end of thread, other threads:[~2011-03-09 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 13:19 [Qemu-devel] [PATCH]hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0 Feiran Zheng
2011-03-09 14:42 ` [Qemu-devel] " Stefano Stabellini
2011-03-09 15:01   ` Stefan Hajnoczi
2011-03-09 15:54 ` [Qemu-devel] " Kevin Wolf

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