aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-09-22 12:21:48 -0400
committerJens Axboe <axboe@fb.com>2014-09-22 14:00:08 -0400
commit90415837659fec54f33584b423dab250eb1e8432 (patch)
tree6d599a1f345351b6d2304797802f4d78f7292027 /block
parent5e940aaa597c15e916618240ae5838864f36c91e (diff)
block: fix blk_abort_request on blk-mq
Signed-off-by: Christoph Hellwig <hch@lst.de> Moved blk_mq_rq_timed_out() definition to the private blk-mq.h header. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq.c2
-rw-r--r--block/blk-mq.h2
-rw-r--r--block/blk-timeout.c6
3 files changed, 8 insertions, 2 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index c5345a951820..a3a80884ed95 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -530,7 +530,7 @@ struct blk_mq_timeout_data {
530 unsigned int next_set; 530 unsigned int next_set;
531}; 531};
532 532
533static void blk_mq_rq_timed_out(struct request *req, bool reserved) 533void blk_mq_rq_timed_out(struct request *req, bool reserved)
534{ 534{
535 struct blk_mq_ops *ops = req->q->mq_ops; 535 struct blk_mq_ops *ops = req->q->mq_ops;
536 enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER; 536 enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
diff --git a/block/blk-mq.h b/block/blk-mq.h
index ca4964a6295d..a3c613a9df2d 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -60,6 +60,8 @@ extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
60extern int blk_mq_sysfs_register(struct request_queue *q); 60extern int blk_mq_sysfs_register(struct request_queue *q);
61extern void blk_mq_sysfs_unregister(struct request_queue *q); 61extern void blk_mq_sysfs_unregister(struct request_queue *q);
62 62
63extern void blk_mq_rq_timed_out(struct request *req, bool reserved);
64
63/* 65/*
64 * Basic implementation of sparser bitmap, allowing the user to spread 66 * Basic implementation of sparser bitmap, allowing the user to spread
65 * the bits over more cachelines. 67 * the bits over more cachelines.
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 8bae410b8a1b..56c025894cdf 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -7,6 +7,7 @@
7#include <linux/fault-inject.h> 7#include <linux/fault-inject.h>
8 8
9#include "blk.h" 9#include "blk.h"
10#include "blk-mq.h"
10 11
11#ifdef CONFIG_FAIL_IO_TIMEOUT 12#ifdef CONFIG_FAIL_IO_TIMEOUT
12 13
@@ -158,7 +159,10 @@ void blk_abort_request(struct request *req)
158 if (blk_mark_rq_complete(req)) 159 if (blk_mark_rq_complete(req))
159 return; 160 return;
160 blk_delete_timer(req); 161 blk_delete_timer(req);
161 blk_rq_timed_out(req); 162 if (req->q->mq_ops)
163 blk_mq_rq_timed_out(req, false);
164 else
165 blk_rq_timed_out(req);
162} 166}
163EXPORT_SYMBOL_GPL(blk_abort_request); 167EXPORT_SYMBOL_GPL(blk_abort_request);
164 168