diff options
author | Christoph Hellwig <hch@lst.de> | 2017-04-20 16:03:01 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-20 12:16:10 -0600 |
commit | 17d5363b83f8c73ef9109f75a4a9b578f31d842f (patch) | |
tree | 07eabf4d2ef1bbba0f5db8dcd8dba4178b5f502c /drivers/scsi/osd/osd_initiator.c | |
parent | d19633d5375b8f4735c389c80865dfbf0474992a (diff) | |
download | talos-obmc-linux-17d5363b83f8c73ef9109f75a4a9b578f31d842f.tar.gz talos-obmc-linux-17d5363b83f8c73ef9109f75a4a9b578f31d842f.zip |
scsi: introduce a result field in struct scsi_request
This passes on the scsi_cmnd result field to users of passthrough
requests. Currently we abuse req->errors for this purpose, but that
field will go away in its current form.
Note that the old IDE code abuses the errors field in very creative
ways and stores all kinds of different values in it. I didn't dare
to touch this magic, so the abuses are brought forward 1:1.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/scsi/osd/osd_initiator.c')
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 5eeab7047d1e..8a1b94816419 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -477,7 +477,7 @@ static void _set_error_resid(struct osd_request *or, struct request *req, int error) { or->async_error = error; - or->req_errors = req->errors ? : error; + or->req_errors = scsi_req(req)->result ? : error; or->sense_len = scsi_req(req)->sense_len; if (or->sense_len) memcpy(or->sense, scsi_req(req)->sense, or->sense_len); @@ -492,7 +492,7 @@ int osd_execute_request(struct osd_request *or) int error; blk_execute_rq(or->request->q, NULL, or->request, 0); - error = or->request->errors ? -EIO : 0; + error = scsi_req(or->request)->result ? -EIO : 0; _set_error_resid(or, or->request, error); return error; |