Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110627
b: refs/heads/master
c: 6680073
h: refs/heads/master
i:
  110625: ff5434d
  110623: 564e61b
v: v3
  • Loading branch information
Kiyoshi Ueda authored and Alasdair G Kergon committed Oct 10, 2008
1 parent 3cf2be4 commit 643842a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01460f3520c100010aacc8f8500cafcb17ce4665
refs/heads/master: 6680073d3ec7c6dbdbf77870bf1fea869767d779
13 changes: 7 additions & 6 deletions trunk/drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct pgpath {
struct list_head list;

struct priority_group *pg; /* Owning PG */
unsigned is_active; /* Path status */
unsigned fail_count; /* Cumulative failure count */

struct dm_path path;
Expand Down Expand Up @@ -123,7 +124,7 @@ static struct pgpath *alloc_pgpath(void)
struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);

if (pgpath)
pgpath->path.is_active = 1;
pgpath->is_active = 1;

return pgpath;
}
Expand Down Expand Up @@ -854,13 +855,13 @@ static int fail_path(struct pgpath *pgpath)

spin_lock_irqsave(&m->lock, flags);

if (!pgpath->path.is_active)
if (!pgpath->is_active)
goto out;

DMWARN("Failing path %s.", pgpath->path.dev->name);

pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
pgpath->path.is_active = 0;
pgpath->is_active = 0;
pgpath->fail_count++;

m->nr_valid_paths--;
Expand Down Expand Up @@ -890,7 +891,7 @@ static int reinstate_path(struct pgpath *pgpath)

spin_lock_irqsave(&m->lock, flags);

if (pgpath->path.is_active)
if (pgpath->is_active)
goto out;

if (!pgpath->pg->ps.type->reinstate_path) {
Expand All @@ -904,7 +905,7 @@ static int reinstate_path(struct pgpath *pgpath)
if (r)
goto out;

pgpath->path.is_active = 1;
pgpath->is_active = 1;

m->current_pgpath = NULL;
if (!m->nr_valid_paths++ && m->queue_size)
Expand Down Expand Up @@ -1292,7 +1293,7 @@ static int multipath_status(struct dm_target *ti, status_type_t type,

list_for_each_entry(p, &pg->pgpaths, list) {
DMEMIT("%s %s %u ", p->path.dev->name,
p->path.is_active ? "A" : "F",
p->is_active ? "A" : "F",
p->fail_count);
if (pg->ps.type->status)
sz += pg->ps.type->status(&pg->ps,
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/md/dm-mpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ struct dm_dev;

struct dm_path {
struct dm_dev *dev; /* Read-only */
unsigned is_active; /* Read-only */

void *pscontext; /* For path-selector use */
};

Expand Down

0 comments on commit 643842a

Please sign in to comment.