search for: req_in_flight

Displaying 6 results from an estimated 6 matches for "req_in_flight".

2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...b/drivers/block/virtio_blk.c index 72fe55d..72b818b 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -46,6 +46,9 @@ struct virtio_blk /* Ida index - used to track minor number allocations. */ int index; + /* Number of pending requests dispatched to driver. */ + int req_in_flight; + /* Scatterlist: can be too big for stack. */ struct scatterlist sg[/*sg_elems*/]; }; @@ -95,6 +98,7 @@ static void blk_done(struct virtqueue *vq) } __blk_end_request_all(vbr->req, error); + vblk->req_in_flight--; mempool_free(vbr, vblk->pool); } /* In case queue is...
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...b/drivers/block/virtio_blk.c index 72fe55d..72b818b 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -46,6 +46,9 @@ struct virtio_blk /* Ida index - used to track minor number allocations. */ int index; + /* Number of pending requests dispatched to driver. */ + int req_in_flight; + /* Scatterlist: can be too big for stack. */ struct scatterlist sg[/*sg_elems*/]; }; @@ -95,6 +98,7 @@ static void blk_done(struct virtqueue *vq) } __blk_end_request_all(vbr->req, error); + vblk->req_in_flight--; mempool_free(vbr, vblk->pool); } /* In case queue is...
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
...ing the device in guest 3. hot-unplug while the device is busy serving I/O Test: ~1000 rounds of hot-plug/hot-unplug test passed with this patch. Changes in v3: - Drop blk_abort_queue and blk_abort_request - Use __blk_end_request_all to complete request dispatched to driver Changes in v2: - Drop req_in_flight - Use virtqueue_detach_unused_buf to get request dispatched to driver Signed-off-by: Asias He <asias at redhat.com> --- drivers/block/virtio_blk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 72fe55d..693187...
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
...ing the device in guest 3. hot-unplug while the device is busy serving I/O Test: ~1000 rounds of hot-plug/hot-unplug test passed with this patch. Changes in v3: - Drop blk_abort_queue and blk_abort_request - Use __blk_end_request_all to complete request dispatched to driver Changes in v2: - Drop req_in_flight - Use virtqueue_detach_unused_buf to get request dispatched to driver Signed-off-by: Asias He <asias at redhat.com> --- drivers/block/virtio_blk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 72fe55d..693187...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
...ll never success if the device is already stopped. We'll have q->in_flight[] > 0, so the drain will not finish. How to reproduce the race: 1. hot-plug a virtio-blk device 2. keep reading/writing the device in guest 3. hot-unplug while the device is busy serving I/O Changes in v2: - Drop req_in_flight - Use virtqueue_detach_unused_buf to get request dispatched to driver Signed-off-by: Asias He <asias at redhat.com> --- drivers/block/virtio_blk.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
...ll never success if the device is already stopped. We'll have q->in_flight[] > 0, so the drain will not finish. How to reproduce the race: 1. hot-plug a virtio-blk device 2. keep reading/writing the device in guest 3. hot-unplug while the device is busy serving I/O Changes in v2: - Drop req_in_flight - Use virtqueue_detach_unused_buf to get request dispatched to driver Signed-off-by: Asias He <asias at redhat.com> --- drivers/block/virtio_blk.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c...