path: root/block/bsg-lib.c
diff options
authorChristoph Hellwig <>2018-03-13 17:28:39 +0100
committerJens Axboe <>2018-03-13 11:40:21 -0600
commit31156ec378c2ed10330c8c06bbf36fb7d7a55506 (patch)
tree7a5b34322146d3e47aba04c347eca3d1919c8fe5 /block/bsg-lib.c
parentce3077ee80d6ac1087c06441f4c63ce5f13ef12c (diff)
bsg-lib: introduce a timeout field in struct bsg_job
The zfcp driver wants to know the timeout for a bsg job, so add a field to struct bsg_job for it in preparation of not exposing the request to the bsg-lib users. Signed-off-by: Christoph Hellwig <> Reviewed-by: Benjamin Block <> Reviewed-by: Hannes Reinecke <> Reviewed-by: Johannes Thumshirn <> Signed-off-by: Jens Axboe <>
Diffstat (limited to 'block/bsg-lib.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index b4fe1a4..fb50977 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -132,6 +132,7 @@ static int bsg_prepare_job(struct device *dev, struct request *req)
struct bsg_job *job = blk_mq_rq_to_pdu(req);
int ret;
+ job->timeout = req->timeout;
job->request = rq->cmd;
job->request_len = rq->cmd_len;