提交 f220fd4e 编写于 作者: M Mike Christie 提交者: Alasdair G Kergon

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: NMike Christie <michaelc@cs.wisc.edu>
Acked-by: NMike Snitzer <snitzer@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 1fbdd2b3
...@@ -329,14 +329,18 @@ static void __choose_pgpath(struct multipath *m, size_t nr_bytes) ...@@ -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. * Loop through priority groups until we find a valid path.
* First time we skip PGs marked 'bypassed'. * 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 { do {
list_for_each_entry(pg, &m->priority_groups, list) { list_for_each_entry(pg, &m->priority_groups, list) {
if (pg->bypassed == bypassed) if (pg->bypassed == bypassed)
continue; 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; return;
}
} }
} while (bypassed--); } while (bypassed--);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册