Add next_pg to table output.
--- diff/drivers/md/dm-mpath.c	2005-01-12 19:18:03.000000000 +0000
+++ source/drivers/md/dm-mpath.c	2005-01-12 19:18:27.000000000 +0000
@@ -43,6 +43,7 @@
 	struct multipath *m;
 	struct path_selector ps;
 
+	unsigned pg_num;
 	unsigned nr_paths;
 	unsigned bypassed;		/* Temporarily bypass this PG */
 	struct list_head pgpaths;
@@ -713,6 +714,7 @@
 		m->nr_valid_paths += pg->nr_paths;
 		list_add_tail(&pg->list, &m->priority_groups);
 		pg_count++;
+		pg->pg_num = pg_count;
 		if (!--next_pg_num)
 			m->next_pg = pg;
 	}
@@ -1041,8 +1043,9 @@
  * Table string has the following format (identical to the constructor string):
  * num_feature_args [features_args]*
  * num_handler_args hw_handler [hw_handler_args]*
- * num_groups [priority selector-name num_ps_args [ps_args]*
- *             num_paths num_selector_args [path_dev [selector_args]* ]+ ]+
+ * num_groups init_group_number
+ *     [priority selector-name num_ps_args [ps_args]*
+ *      num_paths num_selector_args [path_dev [selector_args]* ]+ ]+
  */
 static int multipath_status(struct dm_target *ti, status_type_t type,
 			    char *result, unsigned int maxlen)
@@ -1053,6 +1056,7 @@
 	struct hw_handler *hwh = &m->hw_handler;
 	struct priority_group *pg;
 	struct pgpath *p;
+	unsigned pg_num;
 	char buffer[32];
 	char state;
 
@@ -1112,6 +1116,14 @@
 		break;
 
 	case STATUSTYPE_TABLE:
+		if (m->next_pg)
+			pg_num = m->next_pg->pg_num;
+		else if (m->current_pg)	
+			pg_num = m->current_pg->pg_num;
+		else
+			pg_num = 1;
+
+		DMEMIT("%u ", pg_num);
 		list_for_each_entry(pg, &m->priority_groups, list) {
 			DMEMIT("%s ", pg->ps.type->name);