scsi: ibmvfc: Avoid path failures during live migration
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 26 Oct 2022 18:13:56 +0000 (13:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Dec 2022 16:41:02 +0000 (17:41 +0100)
commitcdbba6a4de393b8642addbd36a1e85737f0abe2c
tree7e027cdc053658fb372ba90d242fd1821a2f08f9
parent6e8124a151bda00a3a275e0e17c81548d57d8716
scsi: ibmvfc: Avoid path failures during live migration

[ Upstream commit 62fa3ce05d5d73c5eccc40b2db493f55fecfc446 ]

Fix an issue reported when performing a live migration when multipath is
configured with a short fast fail timeout of 5 seconds and also to have
no_path_retry set to fail. In this scenario, all paths would go into the
devloss state while the ibmvfc driver went through discovery to log back
in. On a loaded system, the discovery might take longer than 5 seconds,
which was resulting in all paths being marked failed, which then resulted
in a read only filesystem.

This patch changes the migration code in ibmvfc to avoid deleting rports at
all in this scenario, so we avoid losing all paths.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20221026181356.148517-1-brking@linux.vnet.ibm.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/ibmvscsi/ibmvfc.c