Skip to content

Commit f220fd4

Browse files
Mike Christiekergon
authored andcommitted
dm mpath: delay retry of bypassed pg
If I/O needs retrying and only bypassed priority groups are available, set the pg_init_delay_retry flag to wait before retrying. If, for example, the reason for the bypass is that the controller is getting reset or there is a firmware upgrade happening, retrying right away would cause a flood of log messages and retries for what could be a few seconds or even several minutes. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
1 parent 1fbdd2b commit f220fd4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/md/dm-mpath.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,18 @@ static void __choose_pgpath(struct multipath *m, size_t nr_bytes)
329329
/*
330330
* Loop through priority groups until we find a valid path.
331331
* First time we skip PGs marked 'bypassed'.
332-
* Second time we only try the ones we skipped.
332+
* Second time we only try the ones we skipped, but set
333+
* pg_init_delay_retry so we do not hammer controllers.
333334
*/
334335
do {
335336
list_for_each_entry(pg, &m->priority_groups, list) {
336337
if (pg->bypassed == bypassed)
337338
continue;
338-
if (!__choose_path_in_pg(m, pg, nr_bytes))
339+
if (!__choose_path_in_pg(m, pg, nr_bytes)) {
340+
if (!bypassed)
341+
m->pg_init_delay_retry = 1;
339342
return;
343+
}
340344
}
341345
} while (bypassed--);
342346

0 commit comments

Comments
 (0)