Add PG state to status. --- diff/drivers/md/dm-mpath.c 2004-10-29 15:38:42.000000000 +0100 +++ source/drivers/md/dm-mpath.c 2004-10-29 15:38:48.000000000 +0100 @@ -800,7 +800,7 @@ /* * Info string has the following format: - * num_groups [num_paths num_selector_args [path_dev A|F fail_count [selector_args]* ]+ ]+ + * num_groups [A|D|E num_paths num_selector_args [path_dev A|F fail_count [selector_args]* ]+ ]+ * * Table string has the following format (identical to the constructor string): * num_groups [priority selector-name num_paths num_selector_args [path_dev [selector_args]* ]+ ]+ @@ -814,13 +814,22 @@ struct priority_group *pg; struct path *p; char buffer[32]; + char state; switch (type) { case STATUSTYPE_INFO: DMEMIT("%u ", m->nr_priority_groups); list_for_each_entry(pg, &m->priority_groups, list) { - DMEMIT("%u %u ", pg->nr_paths, pg->ps.type->info_args); + if (pg->bypass) + state = 'D'; /* Disabled */ + else if (pg == m->current_pg) + state = 'A'; /* Currently Active */ + else + state = 'E'; /* Enabled */ + + DMEMIT("%c %u %u ", state, pg->nr_paths, + pg->ps.type->info_args); list_for_each_entry(p, &pg->paths, list) { format_dev_t(buffer, p->dev->bdev->bd_dev);