* three little req->errors follow ups
@ 2017-04-26 7:34 Christoph Hellwig
2017-04-26 7:34 ` [PATCH 1/3] scsi_transport_sas: always pass 0 error to blk_end_request_all Christoph Hellwig
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Christoph Hellwig @ 2017-04-26 7:34 UTC (permalink / raw)
To: axboe; +Cc: linux-ide, linux-scsi, linux-block
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] scsi_transport_sas: always pass 0 error to blk_end_request_all
2017-04-26 7:34 three little req->errors follow ups Christoph Hellwig
@ 2017-04-26 7:34 ` Christoph Hellwig
2017-04-26 7:34 ` [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all Christoph Hellwig
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2017-04-26 7:34 UTC (permalink / raw)
To: axboe; +Cc: linux-ide, linux-scsi, linux-block
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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/scsi/scsi_transport_sas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c
index a2b279737a4b..9fdbd50c31b4 100644
--- a/drivers/scsi/scsi_transport_sas.c
+++ b/drivers/scsi/scsi_transport_sas.c
@@ -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);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all
2017-04-26 7:34 three little req->errors follow ups Christoph Hellwig
2017-04-26 7:34 ` [PATCH 1/3] scsi_transport_sas: always pass 0 error to blk_end_request_all Christoph Hellwig
@ 2017-04-26 7:34 ` Christoph Hellwig
2017-04-26 10:32 ` Bartlomiej Zolnierkiewicz
2017-04-26 14:39 ` David Miller
2017-04-26 7:34 ` [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset Christoph Hellwig
2017-04-26 13:54 ` three little req->errors follow ups Jens Axboe
3 siblings, 2 replies; 9+ messages in thread
From: Christoph Hellwig @ 2017-04-26 7:34 UTC (permalink / raw)
To: axboe; +Cc: linux-ide, linux-scsi, linux-block
ide_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.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/ide/ide-pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c
index 277c2bb7616f..0977fc1f40ce 100644
--- a/drivers/ide/ide-pm.c
+++ b/drivers/ide/ide-pm.c
@@ -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;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset
2017-04-26 7:34 three little req->errors follow ups Christoph Hellwig
2017-04-26 7:34 ` [PATCH 1/3] scsi_transport_sas: always pass 0 error to blk_end_request_all Christoph Hellwig
2017-04-26 7:34 ` [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all Christoph Hellwig
@ 2017-04-26 7:34 ` Christoph Hellwig
2017-04-26 10:33 ` Bartlomiej Zolnierkiewicz
2017-04-26 14:39 ` David Miller
2017-04-26 13:54 ` three little req->errors follow ups Jens Axboe
3 siblings, 2 replies; 9+ messages in thread
From: Christoph Hellwig @ 2017-04-26 7:34 UTC (permalink / raw)
To: axboe; +Cc: linux-ide, linux-scsi, linux-block
The caller only looks at the scsi_request result field anyway.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/ide/ide-devsets.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ide/ide-devsets.c b/drivers/ide/ide-devsets.c
index b1223234037d..9b69c32ee560 100644
--- a/drivers/ide/ide-devsets.c
+++ b/drivers/ide/ide-devsets.c
@@ -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;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all
2017-04-26 7:34 ` [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all Christoph Hellwig
@ 2017-04-26 10:32 ` Bartlomiej Zolnierkiewicz
2017-04-26 14:39 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-26 10:32 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, linux-ide, linux-scsi, linux-block
On Wednesday, April 26, 2017 09:34:21 AM Christoph Hellwig wrote:
> ide_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.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset
2017-04-26 7:34 ` [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset Christoph Hellwig
@ 2017-04-26 10:33 ` Bartlomiej Zolnierkiewicz
2017-04-26 14:39 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-26 10:33 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: axboe, linux-ide, linux-scsi, linux-block
On Wednesday, April 26, 2017 09:34:22 AM Christoph Hellwig wrote:
> The caller only looks at the scsi_request result field anyway.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: three little req->errors follow ups
2017-04-26 7:34 three little req->errors follow ups Christoph Hellwig
` (2 preceding siblings ...)
2017-04-26 7:34 ` [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset Christoph Hellwig
@ 2017-04-26 13:54 ` Jens Axboe
3 siblings, 0 replies; 9+ messages in thread
From: Jens Axboe @ 2017-04-26 13:54 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-ide, linux-scsi, linux-block
On 04/26/2017 12:34 AM, Christoph Hellwig wrote:
> 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.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all
2017-04-26 7:34 ` [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all Christoph Hellwig
2017-04-26 10:32 ` Bartlomiej Zolnierkiewicz
@ 2017-04-26 14:39 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: David Miller @ 2017-04-26 14:39 UTC (permalink / raw)
To: hch; +Cc: axboe, linux-ide, linux-scsi, linux-block
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 26 Apr 2017 09:34:21 +0200
> ide_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.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset
2017-04-26 7:34 ` [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset Christoph Hellwig
2017-04-26 10:33 ` Bartlomiej Zolnierkiewicz
@ 2017-04-26 14:39 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: David Miller @ 2017-04-26 14:39 UTC (permalink / raw)
To: hch; +Cc: axboe, linux-ide, linux-scsi, linux-block
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 26 Apr 2017 09:34:22 +0200
> The caller only looks at the scsi_request result field anyway.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-04-26 14:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-26 7:34 three little req->errors follow ups Christoph Hellwig
2017-04-26 7:34 ` [PATCH 1/3] scsi_transport_sas: always pass 0 error to blk_end_request_all Christoph Hellwig
2017-04-26 7:34 ` [PATCH 2/3] ide-pm: always pass 0 error to __blk_end_request_all Christoph Hellwig
2017-04-26 10:32 ` Bartlomiej Zolnierkiewicz
2017-04-26 14:39 ` David Miller
2017-04-26 7:34 ` [PATCH 3/3] ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset Christoph Hellwig
2017-04-26 10:33 ` Bartlomiej Zolnierkiewicz
2017-04-26 14:39 ` David Miller
2017-04-26 13:54 ` three little req->errors follow ups Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox