]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/dm-mpath-skip-inactive-paths-during-activation
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / dm-mpath-skip-inactive-paths-during-activation
1 From: Hannes Reinecke <hare@suse.de>
2 Date: Fri, 14 Aug 2009 16:04:05 +0200
3 Subject: dm-mpath: Skip inactive paths when activating pathgroup
4 References: bnc#524797
5
6 Whenever switch pathgroup happens device mapper will try to activate all the
7 paths in the new path group. There is no check to see if the path has already
8 failed. Eventually the failed path will report error. This will reset the
9 current_pgpath and current_pg. The will result in infinite loop. I have added a
10 check to skip the activate_path for the failed path. This fixes the problem.
11
12 Signed-off-by: Babu Moger <babu.moger@lsi.com>
13 Signed-off-by: Hannes Reinecke <hare@suse.de>
14 ---
15 drivers/md/dm-mpath.c | 5 +++--
16 1 files changed, 3 insertions(+), 2 deletions(-)
17
18 diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
19 index ffe3a30..642f85f 100644
20 --- a/drivers/md/dm-mpath.c
21 +++ b/drivers/md/dm-mpath.c
22 @@ -465,9 +465,10 @@ static void process_queued_ios(struct work_struct *work)
23 m->pg_init_count++;
24 m->pg_init_required = 0;
25 list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
26 - /* Skip disabled paths */
27 - if (!tmp->path.dev)
28 + /* Skip disabled or failed paths */
29 + if (!tmp->path.dev || !tmp->is_active)
30 continue;
31 +
32 queue_work(kmpath_handlerd, &tmp->activate_path);
33 m->pg_init_in_progress++;
34 }
35 --
36 1.6.0.2
37