Skip to content

Commit

Permalink
block: fix blk_abort_request on blk-mq
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hellwig <[email protected]>

Moved blk_mq_rq_timed_out() definition to the private blk-mq.h header.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Sep 22, 2014
1 parent 5e940aa commit 9041583
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ struct blk_mq_timeout_data {
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;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;
Expand Down
2 changes: 2 additions & 0 deletions block/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
* the bits over more cachelines.
Expand Down
6 changes: 5 additions & 1 deletion block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/fault-inject.h>

#include "blk.h"
#include "blk-mq.h"

#ifdef CONFIG_FAIL_IO_TIMEOUT

Expand Down Expand Up @@ -158,7 +159,10 @@ void blk_abort_request(struct request *req)
if (blk_mark_rq_complete(req))
return;
blk_delete_timer(req);
blk_rq_timed_out(req);
if (req->q->mq_ops)
blk_mq_rq_timed_out(req, false);
else
blk_rq_timed_out(req);
}
EXPORT_SYMBOL_GPL(blk_abort_request);

Expand Down

0 comments on commit 9041583

Please sign in to comment.