Re: [PATCH 1/9] lpfc: Synchronize NVME transport and lpfc driver devloss_tmo

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

 



On 5/1/20 11:43 PM, James Smart wrote:
The driver is not passing it's devloss tmo to the nvme-fc transport when
registering the remote port. Thus devloss tmo for the nvme-fc remote port
will be set to the transport's default. This causes driver actions to be
out of sync with transport actions and out of sync with scsi actions for
perhaps the same remote port.

This is especially notable in the following scenario: while remote port
is attached, devloss is changed globally for lpfc remote ports via lpfc
sysfs parameter. lpfc ties this change in with nvme-fc transport. If the
device disconnects long enough for devloss to expire thus the existing
remote port is deleted, then the remote port is re-discovered, the newly
created remote port will end up set at the transport default, not lpfc's
value.

Fix by setting devloss tmo value when registering the remote port.

Signed-off-by: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx>
Signed-off-by: James Smart <jsmart2021@xxxxxxxxx>
---
  drivers/scsi/lpfc/lpfc_nvme.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 12d2b2775773..43df08aeecf1 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -2296,6 +2296,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
rpinfo.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn);
  	rpinfo.node_name = wwn_to_u64(ndlp->nlp_nodename.u.wwn);
+	rpinfo.dev_loss_tmo = vport->cfg_devloss_tmo;
spin_lock_irq(&vport->phba->hbalock);
  	oldrport = lpfc_ndlp_get_nrport(ndlp);

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@xxxxxxx                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[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