diff options
| author | Mike Christie <michaelc@cs.wisc.edu> | 2012-06-03 00:29:45 +0100 | 
|---|---|---|
| committer | Alasdair G Kergon <agk@redhat.com> | 2012-06-03 00:29:45 +0100 | 
| commit | f220fd4efb334a772f9a14b2372175f38d89355e (patch) | |
| tree | eeca11526d28f47e7595c66079621e4bfb1e827c | |
| parent | 1fbdd2b3a3cf77f77b0cdf25dd969241ea2c0ce1 (diff) | |
| download | olio-linux-3.10-f220fd4efb334a772f9a14b2372175f38d89355e.tar.xz olio-linux-3.10-f220fd4efb334a772f9a14b2372175f38d89355e.zip  | |
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>
| -rw-r--r-- | drivers/md/dm-mpath.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index c35160786cf..2469ba68dc2 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -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--);  |