summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-08-13 11:12:54 +1000
committerNeilBrown <neilb@suse.de>2009-08-13 11:12:54 +1000
commite9e43ec36756c50a5dabf6db52d9bebbccaaa72f (patch)
treeac201cf8558875cbb1d5091f985a6bb3053b4cf7 /Assemble.c
parent7236ee7ad4a15b0d800cfc1ccbcee78158a05ada (diff)
downloadmdadm-e9e43ec36756c50a5dabf6db52d9bebbccaaa72f.tar.gz
mdadm-e9e43ec36756c50a5dabf6db52d9bebbccaaa72f.tar.xz
mdadm-e9e43ec36756c50a5dabf6db52d9bebbccaaa72f.zip
Grow: support restart of new migrations.
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index e75c7e5..3bde9ce 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -985,6 +985,8 @@ int Assemble(struct supertype *st, char *mddev,
}
if (err) {
fprintf(stderr, Name ": Failed to restore critical section for reshape, sorry.\n");
+ if (backup_file == NULL)
+ fprintf(stderr," Possibly you needed to specify the --backup-file\n");
close(mdfd);
return err;
}
@@ -1093,7 +1095,18 @@ int Assemble(struct supertype *st, char *mddev,
content->array.layout, clean, avail, okcnt) &&
(okcnt >= req_cnt || start_partial_ok)
))) {
- if (ioctl(mdfd, RUN_ARRAY, NULL)==0) {
+ /* This array is good-to-go.
+ * If a reshape is in progress then we might need to
+ * continue monitoring it. In that case we start
+ * it read-only and let the grow code make it writable.
+ */
+ int rv;
+ if (content->reshape_active &&
+ content->delta_disks <= 0)
+ rv = Grow_continue(mdfd, st, content, backup_file);
+ else
+ rv = ioctl(mdfd, RUN_ARRAY, NULL);
+ if (rv == 0) {
if (verbose >= 0) {
fprintf(stderr, Name ": %s has been started with %d drive%s",
mddev, okcnt, okcnt==1?"":"s");