Add the number of priority groups to the dm-multipath constructor string. This should make parsing the string a bit simpler. --- diff/drivers/md/dm-mpath.c 2004-01-13 15:44:45.000000000 -0600 +++ source/drivers/md/dm-mpath.c 2004-01-16 09:44:40.000000000 -0600 @@ -313,8 +313,8 @@ /*----------------------------------------------------------------- * Constructor/argument parsing: - * <poll interval??> [<priority> <selector> <selector args> - * <num paths> [<path> <arg>]] + * <poll interval> <num priority groups> [<priority> <selector> + * <num selector args> <num paths> [<path> [<arg>]* ]+ ]+ *---------------------------------------------------------------*/ struct param { unsigned min; @@ -535,9 +535,10 @@ /* target parameters */ static struct param _params[] = { {1, 60 * 60, ESTR("invalid path test interval")}, + {1, 1024, ESTR("invalid number of priority groups")}, }; - int r; + int r, pg_count; struct multipath *m; struct arg_set as; @@ -554,6 +555,10 @@ if (r) goto bad; + r = read_param(_params + 1, shift(&as), &pg_count, &ti->error); + if (r) + goto bad; + /* parse the priority groups */ while (as.argc) { struct priority_group *pg;