Sie sind auf Seite 1von 4

Maximum amount of paths with device-mapper-multipath in RHEL 5 ... https://access.redhat.

com/solutions/64446

1 of 4 2/6/2016 3:05 PM
Maximum amount of paths with device-mapper-multipath in RHEL 5 ... https://access.redhat.com/solutions/64446

static struct priority_group *parse_priority_group(struct arg_set *as,


struct multipath *m)
{
static struct param _params[] = {
{1, 1024, "invalid number of paths"},
{0, 1024, "invalid number of selector args"}
};

/*
* read the paths
*/
r = read_param(_params, shift(as), &pg->nr_pgpaths, &ti->error);
if (r)
goto bad;
r = read_param(_params + 1, shift(as), &nr_selector_args, &ti->error);
if (r)
goto bad;

static int read_param(struct param *param, char *str, unsigned *v, char **error)
{
if (!str ||
(sscanf(str, "%u", v) != 1) ||
(*v < param->min) ||
(*v > param->max)) {
*error = param->error;
return -EINVAL;
}
return 0;
}

static int multipath_ctr(struct dm_target *ti, unsigned int argc,


char **argv)
{
/* target parameters */
static struct param _params[] = {
{1, 1024, "invalid number of priority groups"},
{1, 1024, "invalid initial priority group number"},
};

2 of 4 2/6/2016 3:05 PM
Maximum amount of paths with device-mapper-multipath in RHEL 5 ... https://access.redhat.com/solutions/64446

3 of 4 2/6/2016 3:05 PM
Maximum amount of paths with device-mapper-multipath in RHEL 5 ... https://access.redhat.com/solutions/64446

4 of 4 2/6/2016 3:05 PM

Das könnte Ihnen auch gefallen