diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-13 19:40:13 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-22 14:00:07 -0400 |
commit | 0152fb6b57c4fae769ee75ea2ae670f4ff39fba9 (patch) | |
tree | f59f4c6703c1914bc65607f21ae8c868b995f245 /drivers/scsi/scsi_lib.c | |
parent | 46f92d42ee37e10970e33891b7b61a342bd97aeb (diff) |
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: | |||
1932 | return ret; | 1932 | return ret; |
1933 | } | 1933 | } |
1934 | 1934 | ||
1935 | static enum blk_eh_timer_return scsi_timeout(struct request *req, | ||
1936 | bool reserved) | ||
1937 | { | ||
1938 | if (reserved) | ||
1939 | return BLK_EH_RESET_TIMER; | ||
1940 | return scsi_times_out(req); | ||
1941 | } | ||
1942 | |||
1935 | static int scsi_init_request(void *data, struct request *rq, | 1943 | static int scsi_init_request(void *data, struct request *rq, |
1936 | unsigned int hctx_idx, unsigned int request_idx, | 1944 | unsigned int hctx_idx, unsigned int request_idx, |
1937 | unsigned int numa_node) | 1945 | unsigned int numa_node) |
@@ -2043,7 +2051,7 @@ static struct blk_mq_ops scsi_mq_ops = { | |||
2043 | .map_queue = blk_mq_map_queue, | 2051 | .map_queue = blk_mq_map_queue, |
2044 | .queue_rq = scsi_queue_rq, | 2052 | .queue_rq = scsi_queue_rq, |
2045 | .complete = scsi_softirq_done, | 2053 | .complete = scsi_softirq_done, |
2046 | .timeout = scsi_times_out, | 2054 | .timeout = scsi_timeout, |
2047 | .init_request = scsi_init_request, | 2055 | .init_request = scsi_init_request, |
2048 | .exit_request = scsi_exit_request, | 2056 | .exit_request = scsi_exit_request, |
2049 | }; | 2057 | }; |