search for: blk_drain_queu

Displaying 16 results from an estimated 16 matches for "blk_drain_queu".

Did you mean: blk_drain_queue
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will fail. blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued before DEAD marking. However it will 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-...
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will fail. blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued before DEAD marking. However it will 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-...
2012 May 21
6
[RFC PATCH 1/5] block: Introduce q->abort_queue_fn()
When user hot-unplug a disk which is busy serving I/O, __blk_run_queue might be unable to drain all the requests. As a result, the blk_drain_queue() would loop forever and blk_cleanup_queue would not return. So hot-unplug will fail. This patch adds a callback in blk_drain_queue() for low lever driver to abort requests. Currently, this is useful for virtio-blk to do cleanup in hot-unplug. Cc: Jens Axboe <axboe at kernel.dk> Cc: Tejun...
2012 May 21
6
[RFC PATCH 1/5] block: Introduce q->abort_queue_fn()
When user hot-unplug a disk which is busy serving I/O, __blk_run_queue might be unable to drain all the requests. As a result, the blk_drain_queue() would loop forever and blk_cleanup_queue would not return. So hot-unplug will fail. This patch adds a callback in blk_drain_queue() for low lever driver to abort requests. Currently, this is useful for virtio-blk to do cleanup in hot-unplug. Cc: Jens Axboe <axboe at kernel.dk> Cc: Tejun...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will fail. blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued before DEAD marking. However it will 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-...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will fail. blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued before DEAD marking. However it will 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-...
2012 May 25
9
[PATCH 0/3] Fix hot-unplug race in virtio-blk
This patch set fixes the race when hot-unplug stressed disk. Asias He (3): virtio-blk: Call del_gendisk() before disable guest kick virtio-blk: Reset device after blk_cleanup_queue() virtio-blk: Use block layer provided spinlock drivers/block/virtio_blk.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) -- 1.7.10.2
2012 May 25
9
[PATCH 0/3] Fix hot-unplug race in virtio-blk
This patch set fixes the race when hot-unplug stressed disk. Asias He (3): virtio-blk: Call del_gendisk() before disable guest kick virtio-blk: Reset device after blk_cleanup_queue() virtio-blk: Use block layer provided spinlock drivers/block/virtio_blk.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) -- 1.7.10.2
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will fail. blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued before DEAD marking. However it will 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-...
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will fail. blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued before DEAD marking. However it will 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-...
2011 Nov 15
0
[PATCH 00/11] virtio: Support for hibernation (S4)
...for the only disk in the VM, IO works fine before > > > and after. > > I'm not familiar with the suspend code, but: > > 1) Does it already ensure there are no outstanding I/O requests? If > not, we want to restore them when we unfreeze. For the blk code, I added blk_drain_queue() and related calls to the freeze handler, that was missed earlier. > 2) Does it stop more I/O from reaching do_virtblk_request during freeze? > If not, we need to. Added blk_stop_queue() and blk_start_queue() calls to ensure this. > If we need to save and restore requests, I don...
2011 Nov 15
0
[PATCH 00/11] virtio: Support for hibernation (S4)
...for the only disk in the VM, IO works fine before > > > and after. > > I'm not familiar with the suspend code, but: > > 1) Does it already ensure there are no outstanding I/O requests? If > not, we want to restore them when we unfreeze. For the blk code, I added blk_drain_queue() and related calls to the freeze handler, that was missed earlier. > 2) Does it stop more I/O from reaching do_virtblk_request during freeze? > If not, we need to. Added blk_stop_queue() and blk_start_queue() calls to ensure this. > If we need to save and restore requests, I don...
2014 Jun 10
0
[PATCH 3.4 46/88] virtio-blk: Reset device after blk_cleanup_queue()
...ream. blk_cleanup_queue() will call blk_drian_queue() to drain all the requests before queue DEAD marking. If we reset the device before blk_cleanup_queue() the drain would fail. 1) if the queue is stopped in do_virtblk_request() because device is full, the q->request_fn() will not be called. blk_drain_queue() { while(true) { ... if (!list_empty(&q->queue_head)) __blk_run_queue(q) { if (queue is not stoped) q->request_fn() } ... } } Do no reset the device before blk_cleanup_queue() gives the chance to start the queue in interrupt handler blk_done()....
2014 Jun 10
0
[PATCH 3.4 46/88] virtio-blk: Reset device after blk_cleanup_queue()
...ream. blk_cleanup_queue() will call blk_drian_queue() to drain all the requests before queue DEAD marking. If we reset the device before blk_cleanup_queue() the drain would fail. 1) if the queue is stopped in do_virtblk_request() because device is full, the q->request_fn() will not be called. blk_drain_queue() { while(true) { ... if (!list_empty(&q->queue_head)) __blk_run_queue(q) { if (queue is not stoped) q->request_fn() } ... } } Do no reset the device before blk_cleanup_queue() gives the chance to start the queue in interrupt handler blk_done()....
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...k_run_queue(struct request_queue *q) { + lockdep_assert_held(q->queue_lock); + if (unlikely(blk_queue_stopped(q))) return; q->request_fn(q); } EXPORT_SYMBOL(__blk_run_queue); /** * blk_run_queue_async - run a single device queue in workqueue context @@ -372,30 +374,30 @@ void blk_drain_queue(struct request_queue *q, bool drain_all) /* * This function might be called on a queue which failed * driver init after queue creation. Some drivers * (e.g. fd) get unhappy in such cases. Kick queue iff * dispatch queue has something on it. */ if (!list_empty(&q-&gt...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...k_run_queue(struct request_queue *q) { + lockdep_assert_held(q->queue_lock); + if (unlikely(blk_queue_stopped(q))) return; q->request_fn(q); } EXPORT_SYMBOL(__blk_run_queue); /** * blk_run_queue_async - run a single device queue in workqueue context @@ -372,30 +374,30 @@ void blk_drain_queue(struct request_queue *q, bool drain_all) /* * This function might be called on a queue which failed * driver init after queue creation. Some drivers * (e.g. fd) get unhappy in such cases. Kick queue iff * dispatch queue has something on it. */ if (!list_empty(&q-&gt...