diff options
author | NeilBrown <neilb@suse.de> | 2013-06-19 16:33:55 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-06-19 16:34:47 +1000 |
commit | 71417de6fed75f6c763d27e96b207946bf9e2643 (patch) | |
tree | 92462ec42c9f6d7a1e190a9fe9975d9694e9277e /Assemble.c | |
parent | ccec2685ab551182dac21c481c7e26ce77931a11 (diff) |
Add test for interaction of --assemble with --incr
and fix the bug that it found. The refactor of start_array()
missed a test.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -884,6 +884,7 @@ static int start_array(int mdfd, struct context *c, int clean, char *avail, int start_partial_ok, + int err_ok, int was_forced ) { @@ -892,7 +893,7 @@ static int start_array(int mdfd, unsigned int req_cnt; rv = set_array_info(mdfd, st, content); - if (rv) { + if (rv && !err_ok) { pr_err("failed to set array info for %s: %s\n", mddev, strerror(errno)); return 1; @@ -1706,7 +1707,9 @@ try_again: chosen_drive, devices, okcnt, sparecnt, rebuilding_cnt, c, - clean, avail, start_partial_ok, was_forced); + clean, avail, start_partial_ok, + pre_exist != NULL, + was_forced); if (rv == 1 && !pre_exist) ioctl(mdfd, STOP_ARRAY, NULL); free(devices); |