diff options
author | Mike Snitzer <snitzer@redhat.com> | 2016-09-14 16:36:39 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-09-15 17:16:05 +0200 |
commit | e0c107526960d1348cfe21f12bcfb3348fd7e8ab (patch) | |
tree | 57a16a3df06950f2f672a920d46cd430fd835f2a /drivers/md/dm-rq.c | |
parent | dm rq: reduce arguments passed to map_request() and dm_requeue_original_reque... (diff) | |
download | linux-e0c107526960d1348cfe21f12bcfb3348fd7e8ab.tar.xz linux-e0c107526960d1348cfe21f12bcfb3348fd7e8ab.zip |
dm rq: introduce dm_mq_kick_requeue_list()
Make it possible for a request-based target to kick the DM device's
blk-mq request_queue's requeue_list.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Diffstat (limited to 'drivers/md/dm-rq.c')
-rw-r--r-- | drivers/md/dm-rq.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c index 8eefc0ad7a59..877b8f33620e 100644 --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@ -336,19 +336,28 @@ static void dm_old_requeue_request(struct request *rq) spin_unlock_irqrestore(q->queue_lock, flags); } -static void dm_mq_delay_requeue_request(struct request *rq, unsigned long msecs) +static void __dm_mq_kick_requeue_list(struct request_queue *q, unsigned long msecs) { - struct request_queue *q = rq->q; unsigned long flags; - blk_mq_requeue_request(rq); - spin_lock_irqsave(q->queue_lock, flags); if (!blk_queue_stopped(q)) blk_mq_delay_kick_requeue_list(q, msecs); spin_unlock_irqrestore(q->queue_lock, flags); } +void dm_mq_kick_requeue_list(struct mapped_device *md) +{ + __dm_mq_kick_requeue_list(dm_get_md_queue(md), 0); +} +EXPORT_SYMBOL(dm_mq_kick_requeue_list); + +static void dm_mq_delay_requeue_request(struct request *rq, unsigned long msecs) +{ + blk_mq_requeue_request(rq); + __dm_mq_kick_requeue_list(rq->q, msecs); +} + static void dm_requeue_original_request(struct dm_rq_target_io *tio, bool delay_requeue) { struct mapped_device *md = tio->md; |