three little req->errors follow ups
Subsystems (3)
While moving forward with the block error work I noticed three more places that pass non-errno values to the end_request variants, and never actually check those return values. This little series fixes those up to always pass 0.
PATCH 1/3 scsi_transport_sas: always pass 0 error to blk_end_request_all
The SAS transport queues are only used by bsg, and bsg always looks at the scsi_request results and never add the error passed in the end_io callback.
--- drivers/scsi/scsi_transport_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_transport_sas.c +1 -1
@@ -186,7 +186,7 @@ static void sas_smp_request(struct request_queue *q, struct Scsi_Host *shost, ret =handler (shost, rphy, req);scsi_req (req)->result = ret; -blk_end_request_all (req, ret); +blk_end_request_all (req,0 );spin_lock_irq (q->queue_lock); }
Signature · 1 line
2.11.0
PATCH 2/3 ide-pm: always pass 0 error to __blk_end_request_all
In reply to Christoph Hellwigide_pm_execute_rq exectures a PM request synchronously, and in the failure case where it calls __blk_end_request_all it never checks the error field passed to the end_io callback, so don't bother setting it.
--- drivers/ide/ide-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/ide-pm.c +1 -1
@@ -57,7 +57,7 @@ static int ide_pm_execute_rq(struct request *rq)if (unlikely (blk_queue_dying (q))) { rq->rq_flags |=RQF_QUIET ;scsi_req (rq)->result = -ENXIO ; -__blk_end_request_all (rq,scsi_req (rq)->result); +__blk_end_request_all (rq,0 );spin_unlock_irq (q->queue_lock);return -ENXIO ; }
Signature · 1 line
2.11.0
Re: [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all
Quoted 5 lines · Christoph Hellwig
ide_pm_execute_rqexectures a PM request synchronously, and in the failure case where it calls__blk_end_request_allit never checks the error field passed to theend_iocallback, so don't bother setting it.Signed-off-by Christoph Hellwig <[email protected]>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Re: [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all
In reply to Christoph HellwigFrom: Christoph Hellwig <[email protected]>
Date: Wed, 26 Apr 2017 09:34:21 +0200
Quoted 5 lines
ide_pm_execute_rqexectures a PM request synchronously, and in the failure case where it calls__blk_end_request_allit never checks the error field passed to theend_iocallback, so don't bother setting it.Signed-off-by Christoph Hellwig <[email protected]>
PATCH 3/3 ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset
In reply to Christoph HellwigThe caller only looks at the scsi_request result field anyway.
--- drivers/ide/ide-devsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/ide-devsets.c +1 -1
@@ -187,6 +187,6 @@ ide_startstop_t ide_do_devset(ide_drive_t *drive, struct request *rq) err =setfunc (drive, *(int *)&scsi_req (rq)->cmd[1 ]);if (err)scsi_req (rq)->result = err; -ide_complete_rq (drive, err,blk_rq_bytes (rq)); +ide_complete_rq (drive,0 ,blk_rq_bytes (rq));return ide_stopped; }
Signature · 1 line
2.11.0
Re: [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset
Quoted 3 lines · Christoph Hellwig
The caller only looks at the
scsi_requestresult field anyway.Signed-off-by Christoph Hellwig <[email protected]>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Re: [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset
In reply to Christoph HellwigFrom: Christoph Hellwig <[email protected]>
Date: Wed, 26 Apr 2017 09:34:22 +0200
Quoted 3 lines
The caller only looks at the
scsi_requestresult field anyway.Signed-off-by Christoph Hellwig <[email protected]>
Quoted 4 lines · Christoph Hellwig
While moving forward with the block error work I noticed three more places that pass non-errno values to the
end_requestvariants, and never actually check those return values. This little series fixes those up to always pass 0.
Applied, thanks.
Signature · 1 line
Jens Axboe