diff options
author | NeilBrown <neilb@suse.de> | 2009-08-13 11:12:54 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-08-13 11:12:54 +1000 |
commit | e9e43ec36756c50a5dabf6db52d9bebbccaaa72f (patch) | |
tree | ac201cf8558875cbb1d5091f985a6bb3053b4cf7 /Assemble.c | |
parent | 7236ee7ad4a15b0d800cfc1ccbcee78158a05ada (diff) | |
download | mdadm-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.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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"); |