From b4a80278d5cd225b414cbeced480fa75f22391f0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 11 Aug 2022 15:28:59 +0200 Subject: [PATCH] 5.19-stable patches added patches: pnfs-flexfiles-report-rdma-connection-errors-to-the-server.patch revert-pnfs-nfs3_set_ds_client-should-set-nfs_cs_noping.patch scsi-revert-scsi-qla2xxx-fix-disk-failure-to-rediscover.patch --- ...rdma-connection-errors-to-the-server.patch | 42 ++++++++++++ ...t_ds_client-should-set-nfs_cs_noping.patch | 31 +++++++++ ...a2xxx-fix-disk-failure-to-rediscover.patch | 67 +++++++++++++++++++ queue-5.19/series | 3 + 4 files changed, 143 insertions(+) create mode 100644 queue-5.19/pnfs-flexfiles-report-rdma-connection-errors-to-the-server.patch create mode 100644 queue-5.19/revert-pnfs-nfs3_set_ds_client-should-set-nfs_cs_noping.patch create mode 100644 queue-5.19/scsi-revert-scsi-qla2xxx-fix-disk-failure-to-rediscover.patch diff --git a/queue-5.19/pnfs-flexfiles-report-rdma-connection-errors-to-the-server.patch b/queue-5.19/pnfs-flexfiles-report-rdma-connection-errors-to-the-server.patch new file mode 100644 index 00000000000..edb7dd07acb --- /dev/null +++ b/queue-5.19/pnfs-flexfiles-report-rdma-connection-errors-to-the-server.patch @@ -0,0 +1,42 @@ +From 7836d75467e9d214bdf5c693b32721de729a6e38 Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Wed, 18 May 2022 16:09:06 -0400 +Subject: pNFS/flexfiles: Report RDMA connection errors to the server + +From: Trond Myklebust + +commit 7836d75467e9d214bdf5c693b32721de729a6e38 upstream. + +The RPC/RDMA driver will return -EPROTO and -ENODEV as connection errors +under certain circumstances. Make sure that we handle them and report +them to the server. If not, we can end up cycling forever in a +LAYOUTGET/LAYOUTRETURN loop. + +Fixes: a12f996d3413 ("NFSv4/pNFS: Use connections to a DS that are all of the same protocol family") +Cc: stable@vger.kernel.org # 5.11.x +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/fs/nfs/flexfilelayout/flexfilelayout.c ++++ b/fs/nfs/flexfilelayout/flexfilelayout.c +@@ -1131,6 +1131,8 @@ static int ff_layout_async_handle_error_ + case -EIO: + case -ETIMEDOUT: + case -EPIPE: ++ case -EPROTO: ++ case -ENODEV: + dprintk("%s DS connection error %d\n", __func__, + task->tk_status); + nfs4_delete_deviceid(devid->ld, devid->nfs_client, +@@ -1236,6 +1238,8 @@ static void ff_layout_io_track_ds_error( + case -ENOBUFS: + case -EPIPE: + case -EPERM: ++ case -EPROTO: ++ case -ENODEV: + *op_status = status = NFS4ERR_NXIO; + break; + case -EACCES: diff --git a/queue-5.19/revert-pnfs-nfs3_set_ds_client-should-set-nfs_cs_noping.patch b/queue-5.19/revert-pnfs-nfs3_set_ds_client-should-set-nfs_cs_noping.patch new file mode 100644 index 00000000000..bc934f02389 --- /dev/null +++ b/queue-5.19/revert-pnfs-nfs3_set_ds_client-should-set-nfs_cs_noping.patch @@ -0,0 +1,31 @@ +From 9597152d98840c2517230740952df97cfcc07e2f Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Wed, 18 May 2022 16:37:56 -0400 +Subject: Revert "pNFS: nfs3_set_ds_client should set NFS_CS_NOPING" + +From: Trond Myklebust + +commit 9597152d98840c2517230740952df97cfcc07e2f upstream. + +This reverts commit c6eb58435b98bd843d3179664a0195ff25adb2c3. +If a transport is down, then we want to fail over to other transports if +they are listed in the GETDEVICEINFO reply. + +Fixes: c6eb58435b98 ("pNFS: nfs3_set_ds_client should set NFS_CS_NOPING") +Cc: stable@vger.kernel.org # 5.11.x +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman +--- + fs/nfs/nfs3client.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/fs/nfs/nfs3client.c ++++ b/fs/nfs/nfs3client.c +@@ -108,7 +108,6 @@ struct nfs_client *nfs3_set_ds_client(st + if (mds_srv->flags & NFS_MOUNT_NORESVPORT) + __set_bit(NFS_CS_NORESVPORT, &cl_init.init_flags); + +- __set_bit(NFS_CS_NOPING, &cl_init.init_flags); + __set_bit(NFS_CS_DS, &cl_init.init_flags); + + /* Use the MDS nfs_client cl_ipaddr. */ diff --git a/queue-5.19/scsi-revert-scsi-qla2xxx-fix-disk-failure-to-rediscover.patch b/queue-5.19/scsi-revert-scsi-qla2xxx-fix-disk-failure-to-rediscover.patch new file mode 100644 index 00000000000..e4cbad915fd --- /dev/null +++ b/queue-5.19/scsi-revert-scsi-qla2xxx-fix-disk-failure-to-rediscover.patch @@ -0,0 +1,67 @@ +From 5bc7b01c513a4a9b4cfe306e8d1720cfcfd3b8a3 Mon Sep 17 00:00:00 2001 +From: Nilesh Javali +Date: Tue, 12 Jul 2022 22:20:36 -0700 +Subject: scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover" + +From: Nilesh Javali + +commit 5bc7b01c513a4a9b4cfe306e8d1720cfcfd3b8a3 upstream. + +This fixes the regression of NVMe discovery failure during driver load +time. + +This reverts commit 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99. + +Link: https://lore.kernel.org/r/20220713052045.10683-2-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 5 ++--- + drivers/scsi/qla2xxx/qla_nvme.c | 5 ----- + 2 files changed, 2 insertions(+), 8 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -5767,8 +5767,6 @@ qla2x00_reg_remote_port(scsi_qla_host_t + if (atomic_read(&fcport->state) == FCS_ONLINE) + return; + +- qla2x00_set_fcport_state(fcport, FCS_ONLINE); +- + rport_ids.node_name = wwn_to_u64(fcport->node_name); + rport_ids.port_name = wwn_to_u64(fcport->port_name); + rport_ids.port_id = fcport->d_id.b.domain << 16 | +@@ -5869,7 +5867,6 @@ qla2x00_update_fcport(scsi_qla_host_t *v + qla2x00_reg_remote_port(vha, fcport); + break; + case MODE_TARGET: +- qla2x00_set_fcport_state(fcport, FCS_ONLINE); + if (!vha->vha_tgt.qla_tgt->tgt_stop && + !vha->vha_tgt.qla_tgt->tgt_stopped) + qlt_fc_port_added(vha, fcport); +@@ -5887,6 +5884,8 @@ qla2x00_update_fcport(scsi_qla_host_t *v + if (NVME_TARGET(vha->hw, fcport)) + qla_nvme_register_remote(vha, fcport); + ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); ++ + if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) { + if (fcport->id_changed) { + fcport->id_changed = 0; +--- a/drivers/scsi/qla2xxx/qla_nvme.c ++++ b/drivers/scsi/qla2xxx/qla_nvme.c +@@ -37,11 +37,6 @@ int qla_nvme_register_remote(struct scsi + (fcport->nvme_flag & NVME_FLAG_REGISTERED)) + return 0; + +- if (atomic_read(&fcport->state) == FCS_ONLINE) +- return 0; +- +- qla2x00_set_fcport_state(fcport, FCS_ONLINE); +- + fcport->nvme_flag &= ~NVME_FLAG_RESETTING; + + memset(&req, 0, sizeof(struct nvme_fc_port_info)); diff --git a/queue-5.19/series b/queue-5.19/series index 2f510f3243e..511f1570849 100644 --- a/queue-5.19/series +++ b/queue-5.19/series @@ -1,2 +1,5 @@ makefile-link-with-z-noexecstack-no-warn-rwx-segments.patch x86-link-vdso-and-boot-with-z-noexecstack-no-warn-rwx-segments.patch +revert-pnfs-nfs3_set_ds_client-should-set-nfs_cs_noping.patch +scsi-revert-scsi-qla2xxx-fix-disk-failure-to-rediscover.patch +pnfs-flexfiles-report-rdma-connection-errors-to-the-server.patch -- 2.47.3