search for: blk_abort_queue

Displaying 9 results from an estimated 9 matches for "blk_abort_queue".

2012 Jun 12
1
[PATCH v2] block: Drop dead function blk_abort_queue()
...h | 1 - 2 files changed, 42 deletions(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 7803548..6e4744c 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -197,44 +197,3 @@ void blk_add_timer(struct request *req) mod_timer(&q->timeout, expiry); } -/** - * blk_abort_queue -- Abort all request on given queue - * @queue: pointer to queue - * - */ -void blk_abort_queue(struct request_queue *q) -{ - unsigned long flags; - struct request *rq, *tmp; - LIST_HEAD(list); - - /* - * Not a request based block device, nothing to abort - */ - if (!q->request_fn) - return;...
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
...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 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 +++++++++...
2012 May 04
2
[PATCH v3] virtio-blk: Fix hot-unplug race in remove method
...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 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 +++++++++...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
...vdev->priv; int index = vblk->index; + struct virtblk_req *vbr; /* Prevent config work handler from accessing the device. */ mutex_lock(&vblk->config_lock); vblk->config_enable = false; mutex_unlock(&vblk->config_lock); + /* Abort all request on the queue. */ + blk_abort_queue(vblk->disk->queue); + del_gendisk(vblk->disk); + /* Stop all the virtqueues. */ vdev->config->reset(vdev); - flush_work(&vblk->config_work); - del_gendisk(vblk->disk); + /* Abort request dispatched to driver. */ + while ((vbr = virtqueue_detach_unused_buf(vblk->v...
2012 May 03
1
[PATCH v2] virtio-blk: Fix hot-unplug race in remove method
...vdev->priv; int index = vblk->index; + struct virtblk_req *vbr; /* Prevent config work handler from accessing the device. */ mutex_lock(&vblk->config_lock); vblk->config_enable = false; mutex_unlock(&vblk->config_lock); + /* Abort all request on the queue. */ + blk_abort_queue(vblk->disk->queue); + del_gendisk(vblk->disk); + /* Stop all the virtqueues. */ vdev->config->reset(vdev); - flush_work(&vblk->config_work); - del_gendisk(vblk->disk); + /* Abort request dispatched to driver. */ + while ((vbr = virtqueue_detach_unused_buf(vblk->v...
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...int index = vblk->index; + unsigned long flags; + int req_in_flight; /* Prevent config work handler from accessing the device. */ mutex_lock(&vblk->config_lock); vblk->config_enable = false; mutex_unlock(&vblk->config_lock); + /* Abort all request on the queue. */ + blk_abort_queue(vblk->disk->queue); + del_gendisk(vblk->disk); + /* Stop all the virtqueues. */ vdev->config->reset(vdev); - + vdev->config->del_vqs(vdev); flush_work(&vblk->config_work); - del_gendisk(vblk->disk); + /* Wait requests dispatched to device driver to finish. */...
2012 May 03
2
[PATCH 1/2] virtio-blk: Fix hot-unplug race in remove method
...int index = vblk->index; + unsigned long flags; + int req_in_flight; /* Prevent config work handler from accessing the device. */ mutex_lock(&vblk->config_lock); vblk->config_enable = false; mutex_unlock(&vblk->config_lock); + /* Abort all request on the queue. */ + blk_abort_queue(vblk->disk->queue); + del_gendisk(vblk->disk); + /* Stop all the virtqueues. */ vdev->config->reset(vdev); - + vdev->config->del_vqs(vdev); flush_work(&vblk->config_work); - del_gendisk(vblk->disk); + /* Wait requests dispatched to device driver to finish. */...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...lready pending or this timeout is earlier * than an existing one, modify the timer. Round up to next nearest * second. */ expiry = round_jiffies_up(req->deadline); if (!timer_pending(&q->timeout) || @@ -198,43 +209,47 @@ void blk_add_timer(struct request *req) } /** * blk_abort_queue -- Abort all request on given queue * @queue: pointer to queue * */ void blk_abort_queue(struct request_queue *q) { + struct blk_queue_ctx *ctx; unsigned long flags; struct request *rq, *tmp; LIST_HEAD(list); + unsigned int i; /* * Not a request based block device, nothing to a...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...lready pending or this timeout is earlier * than an existing one, modify the timer. Round up to next nearest * second. */ expiry = round_jiffies_up(req->deadline); if (!timer_pending(&q->timeout) || @@ -198,43 +209,47 @@ void blk_add_timer(struct request *req) } /** * blk_abort_queue -- Abort all request on given queue * @queue: pointer to queue * */ void blk_abort_queue(struct request_queue *q) { + struct blk_queue_ctx *ctx; unsigned long flags; struct request *rq, *tmp; LIST_HEAD(list); + unsigned int i; /* * Not a request based block device, nothing to a...