Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7b934c8 authored by Moger, Babu's avatar Moger, Babu Committed by Alasdair G Kergon
Browse files

dm mpath: skip activate_path for failed paths



This patch adds two minor fixes while processing device mapper path activation.

Skip failed paths while calling activate_path.  If the path is already failed
then activate_path will fail for sure. We don't have to call in that case. In
some case this might cause prolonged retries unnecessarily.

Change the misleading message if the path being activated fails with SCSI_DH_NOSYS.

Signed-off-by: default avatarBabu Moger <babu.moger@lsi.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 83c0d5d5
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -461,6 +461,9 @@ static void process_queued_ios(struct work_struct *work)
		m->pg_init_count++;
		m->pg_init_count++;
		m->pg_init_required = 0;
		m->pg_init_required = 0;
		list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
		list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
			/* Skip failed paths */
			if (!tmp->is_active)
				continue;
			if (queue_work(kmpath_handlerd, &tmp->activate_path))
			if (queue_work(kmpath_handlerd, &tmp->activate_path))
				m->pg_init_in_progress++;
				m->pg_init_in_progress++;
		}
		}
@@ -1142,8 +1145,8 @@ static void pg_init_done(void *data, int errors)
			errors = 0;
			errors = 0;
			break;
			break;
		}
		}
		DMERR("Cannot failover device because scsi_dh_%s was not "
		DMERR("Could not failover the device: Handler scsi_dh_%s "
		      "loaded.", m->hw_handler_name);
		      "Error %d.", m->hw_handler_name, errors);
		/*
		/*
		 * Fail path for now, so we do not ping pong
		 * Fail path for now, so we do not ping pong
		 */
		 */