|
@@ -329,14 +329,18 @@ static void __choose_pgpath(struct multipath *m, size_t nr_bytes)
|
|
|
/*
|
|
|
* Loop through priority groups until we find a valid path.
|
|
|
* First time we skip PGs marked 'bypassed'.
|
|
|
- * Second time we only try the ones we skipped.
|
|
|
+ * Second time we only try the ones we skipped, but set
|
|
|
+ * pg_init_delay_retry so we do not hammer controllers.
|
|
|
*/
|
|
|
do {
|
|
|
list_for_each_entry(pg, &m->priority_groups, list) {
|
|
|
if (pg->bypassed == bypassed)
|
|
|
continue;
|
|
|
- if (!__choose_path_in_pg(m, pg, nr_bytes))
|
|
|
+ if (!__choose_path_in_pg(m, pg, nr_bytes)) {
|
|
|
+ if (!bypassed)
|
|
|
+ m->pg_init_delay_retry = 1;
|
|
|
return;
|
|
|
+ }
|
|
|
}
|
|
|
} while (bypassed--);
|
|
|
|