All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Maier <maier@linux.ibm.com>
To: gregkh@linuxfoundation.org, bblock@linux.ibm.com,
	jremus@linux.ibm.com, martin.petersen@oracle.com,
	stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] scsi: zfcp: fix rport unblock if deleted SCSI devices on" failed to apply to 3.18-stable tree
Date: Mon, 1 Apr 2019 12:02:04 +0200	[thread overview]
Message-ID: <eadbf671-dc9c-3eea-7cb7-c2524502d28e@linux.ibm.com> (raw)
In-Reply-To: <15539408261753@kroah.com>

On 3/30/19 11:13 AM, gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 3.18-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.

The commit that this one fixes does not seem to be in 3.18-stable, so this one 
does not apply and is not necessary. It's OK to live without them in 3.18.

> ------------------ original commit in Linus's tree ------------------
> 
>  From fe67888fc007a76b81e37da23ce5bd8fb95890b0 Mon Sep 17 00:00:00 2001
> From: Steffen Maier <maier@linux.ibm.com>
> Date: Tue, 26 Mar 2019 14:36:58 +0100
> Subject: [PATCH] scsi: zfcp: fix rport unblock if deleted SCSI devices on
>   Scsi_Host
> 
> An already deleted SCSI device can exist on the Scsi_Host and remain there
> because something still holds a reference.  A new SCSI device with the same
> H:C:T:L and FCP device, target port WWPN, and FCP LUN can be created.  When
> we try to unblock an rport, we still find the deleted SCSI device and
> return early because the zfcp_scsi_dev of that SCSI device is not
> ZFCP_STATUS_COMMON_UNBLOCKED. Hence we miss to unblock the rport, even if
> the new proper SCSI device would be in good state.
> 
> Therefore, skip deleted SCSI devices when iterating the sdevs of the shost.
> [cf. __scsi_device_lookup{_by_target}() or scsi_device_get()]
> 
> The following abbreviated trace sequence can indicate such problem:
> 
> Area           : REC
> Tag            : ersfs_3
> LUN            : 0x4045400300000000
> WWPN           : 0x50050763031bd327
> LUN status     : 0x40000000     not ZFCP_STATUS_COMMON_UNBLOCKED
> Ready count    : n		not incremented yet
> Running count  : 0x00000000
> ERP want       : 0x01
> ERP need       : 0xc1		ZFCP_ERP_ACTION_NONE
> 
> Area           : REC
> Tag            : ersfs_3
> LUN            : 0x4045400300000000
> WWPN           : 0x50050763031bd327
> LUN status     : 0x41000000
> Ready count    : n+1
> Running count  : 0x00000000
> ERP want       : 0x01
> ERP need       : 0x01
> 
> ...
> 
> Area           : REC
> Level          : 4		only with increased trace level
> Tag            : ertru_l
> LUN            : 0x4045400300000000
> WWPN           : 0x50050763031bd327
> LUN status     : 0x40000000
> Request ID     : 0x0000000000000000
> ERP status     : 0x01800000
> ERP step       : 0x1000
> ERP action     : 0x01
> ERP count      : 0x00
> 
> NOT followed by a trace record with tag "scpaddy"
> for WWPN 0x50050763031bd327.
> 
> Signed-off-by: Steffen Maier <maier@linux.ibm.com>
> Fixes: 6f2ce1c6af37 ("scsi: zfcp: fix rport unblock race with LUN recovery")
> Cc: <stable@vger.kernel.org> #2.6.32+
> Reviewed-by: Jens Remus <jremus@linux.ibm.com>
> Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> 
> diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
> index 744a64680d5b..c0b2348d7ce6 100644
> --- a/drivers/s390/scsi/zfcp_erp.c
> +++ b/drivers/s390/scsi/zfcp_erp.c
> @@ -1341,6 +1341,9 @@ static void zfcp_erp_try_rport_unblock(struct zfcp_port *port)
>   		struct zfcp_scsi_dev *zsdev = sdev_to_zfcp(sdev);
>   		int lun_status;
>   
> +		if (sdev->sdev_state == SDEV_DEL ||
> +		    sdev->sdev_state == SDEV_CANCEL)
> +			continue;
>   		if (zsdev->port != port)
>   			continue;
>   		/* LUN under port of interest */
> 


-- 
Mit freundlichen Gruessen / Kind regards
Steffen Maier

Linux on IBM Z Development

https://www.ibm.com/privacy/us/en/
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


  reply	other threads:[~2019-04-01 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 10:13 FAILED: patch "[PATCH] scsi: zfcp: fix rport unblock if deleted SCSI devices on" failed to apply to 3.18-stable tree gregkh
2019-04-01 10:02 ` Steffen Maier [this message]
2019-04-01 10:28   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eadbf671-dc9c-3eea-7cb7-c2524502d28e@linux.ibm.com \
    --to=maier@linux.ibm.com \
    --cc=bblock@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jremus@linux.ibm.com \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.