Re: [Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-22 Thread Fam Zheng
On Sun, 11/22 20:41, Paolo Bonzini wrote: > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > > index e70fccf..848f3fe 100644 > > --- a/hw/block/virtio-blk.c > > +++ b/hw/block/virtio-blk.c > > @@ -112,6 +112,10 @@ static void virtio_blk_rw_complete(void *opaque, int > > ret) > >

Re: [Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-22 Thread Paolo Bonzini
On 17/11/2015 11:20, Fam Zheng wrote: > When a request R is absorbed by request M, it is appended to the > "mr_next" queue led by M, and is completed together with the completion > of M, in virtio_blk_rw_complete. > > During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are > parse

Re: [Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Laurent Vivier
On 17/11/2015 11:34, Stefan Hajnoczi wrote: > On Tue, Nov 17, 2015 at 06:20:11PM +0800, Fam Zheng wrote: >> When a request R is absorbed by request M, it is appended to the >> "mr_next" queue led by M, and is completed together with the completion >> of M, in virtio_blk_rw_complete. >> >> During

Re: [Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Stefan Hajnoczi
On Tue, Nov 17, 2015 at 06:20:11PM +0800, Fam Zheng wrote: > When a request R is absorbed by request M, it is appended to the > "mr_next" queue led by M, and is completed together with the completion > of M, in virtio_blk_rw_complete. > > During DMA restart in virtio_blk_dma_restart_bh, requests i

[Qemu-devel] [PATCH v3] virtio-blk: Fix double completion for werror=stop

2015-11-17 Thread Fam Zheng
When a request R is absorbed by request M, it is appended to the "mr_next" queue led by M, and is completed together with the completion of M, in virtio_blk_rw_complete. During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are parsed and submitted again, possibly with a stale req->mr