Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Babu Moger <babu.moger@lsi.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

authored by

Moger, Babu and committed by
Alasdair G Kergon
f7b934c8 83c0d5d5

+5 -2
+5 -2
drivers/md/dm-mpath.c
··· 461 461 m->pg_init_count++; 462 462 m->pg_init_required = 0; 463 463 list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) { 464 + /* Skip failed paths */ 465 + if (!tmp->is_active) 466 + continue; 464 467 if (queue_work(kmpath_handlerd, &tmp->activate_path)) 465 468 m->pg_init_in_progress++; 466 469 } ··· 1145 1142 errors = 0; 1146 1143 break; 1147 1144 } 1148 - DMERR("Cannot failover device because scsi_dh_%s was not " 1149 - "loaded.", m->hw_handler_name); 1145 + DMERR("Could not failover the device: Handler scsi_dh_%s " 1146 + "Error %d.", m->hw_handler_name, errors); 1150 1147 /* 1151 1148 * Fail path for now, so we do not ping pong 1152 1149 */