]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/dm-abort-queue-on-failed-paths
Changed checkfs to auto reboot after correctable fsck fixes.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / dm-abort-queue-on-failed-paths
CommitLineData
00e5a55c
BS
1Subject: dm: Call blk_abort_queue on failed paths
2From: Mike Anderson <andmike@linux.vnet.ibm.com>
3Date: Thu Oct 9 08:56:14 2008 +0200:
4Git: 224cb3e981f1b2f9f93dbd49eaef505d17d894c2
5References: bnc#434105
6
7Another small bugfix for request timeout.
8
9Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
10Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11Signed-off-by: Hannes Reinecke <hare@suse.de>
12
13diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
14index c2fcf28..3d38481 100644
15--- a/drivers/md/dm-mpath.c
16+++ b/drivers/md/dm-mpath.c
17@@ -33,6 +33,7 @@ struct pgpath {
18 unsigned fail_count; /* Cumulative failure count */
19
20 struct dm_path path;
21+ struct work_struct deactivate_path;
22 };
23
24 #define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path)
25@@ -112,6 +113,7 @@ static struct workqueue_struct *kmultipathd, *kmpath_handlerd;
26 static void process_queued_ios(struct work_struct *work);
27 static void trigger_event(struct work_struct *work);
28 static void activate_path(struct work_struct *work);
29+static void deactivate_path(struct work_struct *work);
30
31
32 /*-----------------------------------------------
33@@ -122,8 +124,10 @@ static struct pgpath *alloc_pgpath(void)
34 {
35 struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);
36
37- if (pgpath)
38+ if (pgpath) {
39 pgpath->path.is_active = 1;
40+ INIT_WORK(&pgpath->deactivate_path, deactivate_path);
41+ }
42
43 return pgpath;
44 }
45@@ -133,6 +137,14 @@ static void free_pgpath(struct pgpath *pgpath)
46 kfree(pgpath);
47 }
48
49+static void deactivate_path(struct work_struct *work)
50+{
51+ struct pgpath *pgpath =
52+ container_of(work, struct pgpath, deactivate_path);
53+
54+ blk_abort_queue(pgpath->path.dev->bdev->bd_disk->queue);
55+}
56+
57 static struct priority_group *alloc_priority_group(void)
58 {
59 struct priority_group *pg;
60@@ -870,6 +882,7 @@ static int fail_path(struct pgpath *pgpath)
61 pgpath->path.dev->name, m->nr_valid_paths);
62
63 queue_work(kmultipathd, &m->trigger_event);
64+ queue_work(kmultipathd, &pgpath->deactivate_path);
65
66 out:
67 spin_unlock_irqrestore(&m->lock, flags);