From: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> For multipath capable devices call scsi_mpath_failover_disposition() to kick off failover to another path. This will call path selector algorithm to pick active path for the failover. Signed-off-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> --- drivers/scsi/scsi_error.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 612489afe8d2..d5d1b20928a6 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -40,6 +40,7 @@ #include <scsi/scsi_ioctl.h> #include <scsi/scsi_dh.h> #include <scsi/scsi_devinfo.h> +#include <scsi/scsi_multipath.h> #include <scsi/sg.h> #include "scsi_priv.h" @@ -2047,6 +2048,13 @@ enum scsi_disposition scsi_decide_disposition(struct scsi_cmnd *scmd) maybe_retry: + /* + * For SCSI Multipath check if there are path errors to + * trigger failover to available path + */ + if (scsi_mpath_enabled(scmd->device)) + return scsi_mpath_failover_disposition(scmd); + /* we requeue for retry because the error was retryable, and * the request was not marked fast fail. Note that above, * even if the request is marked fast fail, we still requeue -- 2.41.0.rc2