block, scsi: move the retries field to struct scsi_request
Instead of bloating the generic struct request with it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
44e44b29fb
commit
64c7f1d157
@@ -256,7 +256,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
|
||||
rq->cmd_len = COMMAND_SIZE(cmd[0]);
|
||||
memcpy(rq->cmd, cmd, rq->cmd_len);
|
||||
req->retries = retries;
|
||||
rq->retries = retries;
|
||||
req->timeout = timeout;
|
||||
req->cmd_flags |= flags;
|
||||
req->rq_flags |= rq_flags | RQF_QUIET | RQF_PREEMPT;
|
||||
@@ -1177,7 +1177,7 @@ static int scsi_setup_scsi_cmnd(struct scsi_device *sdev, struct request *req)
|
||||
cmd->cmd_len = scsi_req(req)->cmd_len;
|
||||
cmd->cmnd = scsi_req(req)->cmd;
|
||||
cmd->transfersize = blk_rq_bytes(req);
|
||||
cmd->allowed = req->retries;
|
||||
cmd->allowed = scsi_req(req)->retries;
|
||||
return BLKPREP_OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user