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>
This commit is contained in:

committed by
Jens Axboe

parent
46f92d42ee
commit
0152fb6b57
@@ -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,
|
||||
};
|
||||
|
Reference in New Issue
Block a user