static int Incremental_container(struct supertype *st, char *devname,
char *homehost,
- int verbose, int runstop, int autof);
+ int verbose, int runstop, int autof,
+ int freeze_reshape);
static struct mddev_ident *search_mdstat(struct supertype *st,
struct mdinfo *info,
int Incremental(char *devname, int verbose, int runstop,
struct supertype *st, char *homehost, int require_homehost,
- int autof)
+ int autof, int freeze_reshape)
{
/* Add this device to an array, creating the array if necessary
* and starting the array if sensible or - if runstop>0 - if possible.
close(dfd);
if (!rv && st->ss->container_content)
return Incremental_container(st, devname, homehost,
- verbose, runstop, autof);
+ verbose, runstop, autof,
+ freeze_reshape);
fprintf(stderr, Name ": %s is not part of an md array.\n",
devname);
close(mdfd);
sysfs_free(sra);
rv = Incremental(chosen_name, verbose, runstop,
- NULL, homehost, require_homehost, autof);
+ NULL, homehost, require_homehost, autof,
+ freeze_reshape);
if (rv == 1)
/* Don't fail the whole -I if a subarray didn't
* have enough devices to start yet
close(dfd);
*dfdp = -1;
rv = Manage_subdevs(chosen->sys_name, mdfd, &devlist,
- -1, 0, NULL);
+ -1, 0, NULL, 0);
close(mdfd);
}
if (verbose > 0) {
static int Incremental_container(struct supertype *st, char *devname,
char *homehost, int verbose,
- int runstop, int autof)
+ int runstop, int autof, int freeze_reshape)
{
/* Collect the contents of this container and for each
* array, choose a device name and assemble the array.
"Cannot activate array(s).\n");
/* free container data and exit */
sysfs_free(list);
+ map_unlock(&map);
return 2;
}
fprintf(stderr, Name ": array %s/%s is "
"explicitly ignored by mdadm.conf\n",
match->container, match->member);
+ map_unlock(&map);
return 2;
}
if (match)
if (mdfd < 0) {
fprintf(stderr, Name ": failed to open %s: %s.\n",
chosen_name, strerror(errno));
+ map_unlock(&map);
return 2;
}
assemble_container_content(st, mdfd, ra, runstop,
- chosen_name, verbose, NULL);
+ chosen_name, verbose, NULL,
+ freeze_reshape);
close(mdfd);
}
if (subfd >= 0) {
Manage_subdevs(memb->dev, subfd,
&devlist, verbose, 0,
- NULL);
+ NULL, 0);
close(subfd);
}
}
free_mdstat(mdstat);
} else
- Manage_subdevs(ent->dev, mdfd, &devlist, verbose, 0, NULL);
+ Manage_subdevs(ent->dev, mdfd, &devlist, verbose, 0, NULL, 0);
devlist.disposition = 'r';
- rv = Manage_subdevs(ent->dev, mdfd, &devlist, verbose, 0, NULL);
+ rv = Manage_subdevs(ent->dev, mdfd, &devlist, verbose, 0, NULL, 0);
close(mdfd);
free_mdstat(ent);
return rv;