diff options
author | Christoph Hellwig <hch@lst.de> | 2022-02-24 18:55:50 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-01 22:21:50 -0500 |
commit | dbb4c84d87af7416bb7e35f8e6dd8d87d5f221d4 (patch) | |
tree | 631497936089e518bac20582f2b7803a88d478ef /drivers/scsi/st.c | |
parent | a9a4ea1166d640d1b397f24afc1cd7e96c46cd03 (diff) |
scsi: core: Move the result field from struct scsi_request to struct scsi_cmnd
Prepare for removing the scsi_request structure by moving the result field
to struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220224175552.988286-7-hch@lst.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 0546d2c84ad1..c8533ca225bc 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -481,7 +481,7 @@ static void st_do_stats(struct scsi_tape *STp, struct request *req) atomic64_add(ktime_to_ns(now), &STp->stats->tot_write_time); atomic64_add(ktime_to_ns(now), &STp->stats->tot_io_time); atomic64_inc(&STp->stats->write_cnt); - if (scsi_req(req)->result) { + if (scmd->result) { atomic64_add(atomic_read(&STp->stats->last_write_size) - STp->buffer->cmdstat.residual, &STp->stats->write_byte_cnt); @@ -495,7 +495,7 @@ static void st_do_stats(struct scsi_tape *STp, struct request *req) atomic64_add(ktime_to_ns(now), &STp->stats->tot_read_time); atomic64_add(ktime_to_ns(now), &STp->stats->tot_io_time); atomic64_inc(&STp->stats->read_cnt); - if (scsi_req(req)->result) { + if (scmd->result) { atomic64_add(atomic_read(&STp->stats->last_read_size) - STp->buffer->cmdstat.residual, &STp->stats->read_byte_cnt); @@ -516,11 +516,10 @@ static void st_scsi_execute_end(struct request *req, blk_status_t status) { struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(req); struct st_request *SRpnt = req->end_io_data; - struct scsi_request *rq = scsi_req(req); struct scsi_tape *STp = SRpnt->stp; struct bio *tmp; - STp->buffer->cmdstat.midlevel_result = SRpnt->result = rq->result; + STp->buffer->cmdstat.midlevel_result = SRpnt->result = scmd->result; STp->buffer->cmdstat.residual = scmd->resid_len; st_do_stats(STp, req); |