1 Subject: dm: Call blk_abort_queue on failed paths
2 From: Mike Anderson <andmike@linux.vnet.ibm.com>
3 Date: Thu Oct 9 08:56:14 2008 +0200:
4 Git: 224cb3e981f1b2f9f93dbd49eaef505d17d894c2
7 Another small bugfix for request timeout.
9 Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
10 Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
11 Signed-off-by: Hannes Reinecke <hare@suse.de>
14 drivers/md/dm-mpath.c | 15 ++++++++++++++-
15 1 file changed, 14 insertions(+), 1 deletion(-)
17 --- a/drivers/md/dm-mpath.c
18 +++ b/drivers/md/dm-mpath.c
19 @@ -33,6 +33,7 @@ struct pgpath {
20 unsigned fail_count; /* Cumulative failure count */
23 + struct work_struct deactivate_path;
26 #define path_to_pgpath(__pgp) container_of((__pgp), struct pgpath, path)
27 @@ -112,6 +113,7 @@ static struct workqueue_struct *kmultipa
28 static void process_queued_ios(struct work_struct *work);
29 static void trigger_event(struct work_struct *work);
30 static void activate_path(struct work_struct *work);
31 +static void deactivate_path(struct work_struct *work);
34 /*-----------------------------------------------
35 @@ -122,8 +124,10 @@ static struct pgpath *alloc_pgpath(void)
37 struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);
41 pgpath->path.is_active = 1;
42 + INIT_WORK(&pgpath->deactivate_path, deactivate_path);
47 @@ -133,6 +137,14 @@ static void free_pgpath(struct pgpath *p
51 +static void deactivate_path(struct work_struct *work)
53 + struct pgpath *pgpath =
54 + container_of(work, struct pgpath, deactivate_path);
56 + blk_abort_queue(pgpath->path.dev->bdev->bd_disk->queue);
59 static struct priority_group *alloc_priority_group(void)
61 struct priority_group *pg;
62 @@ -881,6 +893,7 @@ static int fail_path(struct pgpath *pgpa
63 pgpath->path.dev->name, m->nr_valid_paths);
65 queue_work(kmultipathd, &m->trigger_event);
66 + queue_work(kmultipathd, &pgpath->deactivate_path);
69 spin_unlock_irqrestore(&m->lock, flags);