1 Subject: dm mpath: remove is_active from struct dm_path
2 From: Hannes Reinecke <hare@suse.de>
3 Date: Fri Oct 24 13:31:15 2008 +0200:
4 Git: 1271668e1c80210efa60c51a52b72bfb587eebe7
6 This patch moves 'is_active' from struct dm_path to struct pgpath
7 as it does not need exporting.
9 Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
10 Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
11 Signed-off-by: Alasdair G Kergon <agk@redhat.com>
18 drivers/md/dm-mpath.c | 13 +++++++------
19 drivers/md/dm-mpath.h | 2 --
20 2 files changed, 7 insertions(+), 8 deletions(-)
22 --- a/drivers/md/dm-mpath.c
23 +++ b/drivers/md/dm-mpath.c
24 @@ -28,6 +28,7 @@ struct pgpath {
25 struct list_head list;
27 struct priority_group *pg; /* Owning PG */
28 + unsigned is_active; /* Path status */
29 unsigned fail_count; /* Cumulative failure count */
32 @@ -122,7 +123,7 @@ static struct pgpath *alloc_pgpath(void)
33 struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);
36 - pgpath->path.is_active = 1;
37 + pgpath->is_active = 1;
38 INIT_WORK(&pgpath->deactivate_path, deactivate_path);
41 @@ -880,13 +881,13 @@ static int fail_path(struct pgpath *pgpa
43 spin_lock_irqsave(&m->lock, flags);
45 - if (!pgpath->path.is_active)
46 + if (!pgpath->is_active)
49 DMWARN("Failing path %s.", pgpath->path.dev->name);
51 pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
52 - pgpath->path.is_active = 0;
53 + pgpath->is_active = 0;
57 @@ -917,7 +918,7 @@ static int reinstate_path(struct pgpath
59 spin_lock_irqsave(&m->lock, flags);
61 - if (pgpath->path.is_active)
62 + if (pgpath->is_active)
65 if (!pgpath->pg->ps.type->reinstate_path) {
66 @@ -931,7 +932,7 @@ static int reinstate_path(struct pgpath
70 - pgpath->path.is_active = 1;
71 + pgpath->is_active = 1;
73 m->current_pgpath = NULL;
74 if (!m->nr_valid_paths++ && m->queue_size)
75 @@ -1306,7 +1307,7 @@ static int multipath_status(struct dm_ta
77 list_for_each_entry(p, &pg->pgpaths, list) {
78 DMEMIT("%s %s %u ", p->path.dev->name,
79 - p->path.is_active ? "A" : "F",
80 + p->is_active ? "A" : "F",
82 if (pg->ps.type->status)
83 sz += pg->ps.type->status(&pg->ps,
84 --- a/drivers/md/dm-mpath.h
85 +++ b/drivers/md/dm-mpath.h
86 @@ -13,8 +13,6 @@ struct dm_dev;
89 struct dm_dev *dev; /* Read-only */
90 - unsigned is_active; /* Read-only */
92 void *pscontext; /* For path-selector use */