]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Assemble: call map_update even when not starting the array.
authorNeilBrown <neilb@suse.de>
Tue, 7 Apr 2009 07:45:42 +0000 (17:45 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 7 Apr 2009 07:45:42 +0000 (17:45 +1000)
For incremental assembly to work, we need to keep the 'map'
up-to-date even when not starting the array yet.

Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c

index 172bc53e80e0393ebedbadfcf0ad4b583c709618..73d6ee231d9f466a99b2330bad7c8d7b3b393ce5 100644 (file)
@@ -1235,13 +1235,16 @@ int assemble_container_content(struct supertype *st, int mdfd,
        if (working == 0) {
                close(mdfd);
                return 1;/* Nothing new, don't try to start */
-       } else if (runstop > 0 ||
+       }
+       
+       map_update(&map, fd2devnum(mdfd),
+                  content->text_version,
+                  content->uuid, chosen_name);
+
+       if (runstop > 0 ||
                 (working + preexist) >= content->array.working_disks) {
                int err;
 
-               map_update(&map, fd2devnum(mdfd),
-                          content->text_version,
-                          content->uuid, chosen_name);
                switch(content->array.level) {
                case LEVEL_LINEAR:
                case LEVEL_MULTIPATH: