diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-14 01:40:13 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-22 20:00:07 +0200 |
commit | 0152fb6b57c4fae769ee75ea2ae670f4ff39fba9 (patch) | |
tree | f59f4c6703c1914bc65607f21ae8c868b995f245 /drivers/scsi/scsi_lib.c | |
parent | blk-mq: unshared timeout handler (diff) | |
download | linux-0152fb6b57c4fae769ee75ea2ae670f4ff39fba9.tar.xz linux-0152fb6b57c4fae769ee75ea2ae670f4ff39fba9.zip |
blk-mq: pass a reserved argument to the timeout handler
Allow blk-mq to pass an argument to the timeout handler to indicate
if we're timing out a reserved or regular command. For many drivers
those need to be handled different.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 73ce7d27f5c8..86b1156edb82 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1932,6 +1932,14 @@ out: return ret; } +static enum blk_eh_timer_return scsi_timeout(struct request *req, + bool reserved) +{ + if (reserved) + return BLK_EH_RESET_TIMER; + return scsi_times_out(req); +} + static int scsi_init_request(void *data, struct request *rq, unsigned int hctx_idx, unsigned int request_idx, unsigned int numa_node) @@ -2043,7 +2051,7 @@ static struct blk_mq_ops scsi_mq_ops = { .map_queue = blk_mq_map_queue, .queue_rq = scsi_queue_rq, .complete = scsi_softirq_done, - .timeout = scsi_times_out, + .timeout = scsi_timeout, .init_request = scsi_init_request, .exit_request = scsi_exit_request, }; |