Commit 90415837 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: fix blk_abort_request on blk-mq

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>

Moved blk_mq_rq_timed_out() definition to the private blk-mq.h header.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 5e940aaa
...@@ -530,7 +530,7 @@ struct blk_mq_timeout_data { ...@@ -530,7 +530,7 @@ struct blk_mq_timeout_data {
unsigned int next_set; unsigned int next_set;
}; };
static void blk_mq_rq_timed_out(struct request *req, bool reserved) void blk_mq_rq_timed_out(struct request *req, bool reserved)
{ {
struct blk_mq_ops *ops = req->q->mq_ops; struct blk_mq_ops *ops = req->q->mq_ops;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER; enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
......
...@@ -60,6 +60,8 @@ extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int); ...@@ -60,6 +60,8 @@ extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
extern int blk_mq_sysfs_register(struct request_queue *q); extern int blk_mq_sysfs_register(struct request_queue *q);
extern void blk_mq_sysfs_unregister(struct request_queue *q); extern void blk_mq_sysfs_unregister(struct request_queue *q);
extern void blk_mq_rq_timed_out(struct request *req, bool reserved);
/* /*
* Basic implementation of sparser bitmap, allowing the user to spread * Basic implementation of sparser bitmap, allowing the user to spread
* the bits over more cachelines. * the bits over more cachelines.
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/fault-inject.h> #include <linux/fault-inject.h>
#include "blk.h" #include "blk.h"
#include "blk-mq.h"
#ifdef CONFIG_FAIL_IO_TIMEOUT #ifdef CONFIG_FAIL_IO_TIMEOUT
...@@ -158,6 +159,9 @@ void blk_abort_request(struct request *req) ...@@ -158,6 +159,9 @@ void blk_abort_request(struct request *req)
if (blk_mark_rq_complete(req)) if (blk_mark_rq_complete(req))
return; return;
blk_delete_timer(req); blk_delete_timer(req);
if (req->q->mq_ops)
blk_mq_rq_timed_out(req, false);
else
blk_rq_timed_out(req); blk_rq_timed_out(req);
} }
EXPORT_SYMBOL_GPL(blk_abort_request); EXPORT_SYMBOL_GPL(blk_abort_request);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment