diff mbox series

[v5,05/52] scsi_transport_fc: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

Message ID 20210809230355.8186-6-bvanassche@acm.org
State New
Headers show
Series [v5,01/52] core: Introduce the scsi_cmd_to_rq() function | expand

Commit Message

Bart Van Assche Aug. 9, 2021, 11:03 p.m. UTC
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/scsi_transport_fc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hannes Reinecke Aug. 10, 2021, 6:19 a.m. UTC | #1
On 8/10/21 1:03 AM, Bart Van Assche wrote:
> Prepare for removal of the request pointer by using scsi_cmd_to_rq()

> instead. This patch does not change any functionality.

> 

> Cc: Christoph Hellwig <hch@lst.de>

> Cc: Hannes Reinecke <hare@suse.de>

> Cc: Ming Lei <ming.lei@redhat.com>

> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

> ---

>   drivers/scsi/scsi_transport_fc.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c

> index 49748cd817a5..60e406bcf42a 100644

> --- a/drivers/scsi/scsi_transport_fc.c

> +++ b/drivers/scsi/scsi_transport_fc.c

> @@ -3804,7 +3804,7 @@ bool fc_eh_should_retry_cmd(struct scsi_cmnd *scmd)

>   	struct fc_rport *rport = starget_to_rport(scsi_target(scmd->device));

>   

>   	if ((rport->port_state != FC_PORTSTATE_ONLINE) &&

> -		(scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT)) {

> +		(scsi_cmd_to_rq(scmd)->cmd_flags & REQ_FAILFAST_TRANSPORT)) {

>   		set_host_byte(scmd, DID_TRANSPORT_MARGINAL);

>   		return false;

>   	}

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 49748cd817a5..60e406bcf42a 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -3804,7 +3804,7 @@  bool fc_eh_should_retry_cmd(struct scsi_cmnd *scmd)
 	struct fc_rport *rport = starget_to_rport(scsi_target(scmd->device));
 
 	if ((rport->port_state != FC_PORTSTATE_ONLINE) &&
-		(scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT)) {
+		(scsi_cmd_to_rq(scmd)->cmd_flags & REQ_FAILFAST_TRANSPORT)) {
 		set_host_byte(scmd, DID_TRANSPORT_MARGINAL);
 		return false;
 	}