Re: [PATCH] qla2xxx: Fix I/Os being passed down when FC device is being deleted.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2020-03-13 at 01:50 -0700, Nilesh Javali wrote:
> From: Arun Easi <aeasi@xxxxxxxxxxx>
> 
> I/Os could be passed down while the device FC SCSI device is being
> deleted.
> This would result in unnecessary delay of I/O and driver messages
> (when
> extended logging is set).
> 
> Signed-off-by: Arun Easi <aeasi@xxxxxxxxxxx>
> ---
>  drivers/scsi/qla2xxx/qla_os.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c
> b/drivers/scsi/qla2xxx/qla_os.c
> index b520a98..7a94e11 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -864,7 +864,7 @@ void qla2xxx_qpair_sp_compl(srb_t *sp, int res)
>  		goto qc24_fail_command;
>  	}
>  
> -	if (atomic_read(&fcport->state) != FCS_ONLINE) {
> +	if (atomic_read(&fcport->state) != FCS_ONLINE || fcport-
> >deleted) {
>  		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
>  			atomic_read(&base_vha->loop_state) ==
> LOOP_DEAD) {
>  			ql_dbg(ql_dbg_io, vha, 0x3005,
> @@ -946,7 +946,7 @@ void qla2xxx_qpair_sp_compl(srb_t *sp, int res)
>  		goto qc24_fail_command;
>  	}
>  
> -	if (atomic_read(&fcport->state) != FCS_ONLINE) {
> +	if (atomic_read(&fcport->state) != FCS_ONLINE || fcport-
> >deleted) {
>  		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
>  			atomic_read(&base_vha->loop_state) ==
> LOOP_DEAD) {
>  			ql_dbg(ql_dbg_io, vha, 0x3077,

Tested-by:   Laurence Oberman <loberman@xxxxxxxxxx>
Reviewed-by: Laurence Oberman <loberman@xxxxxxxxxx>

Built and tested in Red Hat CEE lab with fault injection.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux