]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Teach sysfs_add_disk() callers to use ->recovery_start versus 'insync' parameter
[thirdparty/mdadm.git] / Assemble.c
index a16cafe2c5be0c5f3cbc327faf8e207e79d2cd3d..560e2fe288e0ab2954adf91164fda232b8954228 100644 (file)
@@ -683,7 +683,7 @@ int Assemble(struct supertype *st, char *mddev,
                            > devices[most_recent].i.events)
                                most_recent = devcnt;
                }
-               if (content->array.level == -4)
+               if (content->array.level == LEVEL_MULTIPATH)
                        /* with multipath, the raid_disk from the superblock is meaningless */
                        i = devcnt;
                else
@@ -776,7 +776,7 @@ int Assemble(struct supertype *st, char *mddev,
                /* note: we ignore error flags in multipath arrays
                 * as they don't make sense
                 */
-               if (content->array.level != -4)
+               if (content->array.level != LEVEL_MULTIPATH)
                        if (!(devices[j].i.disk.state & (1<<MD_DISK_ACTIVE))) {
                                if (!(devices[j].i.disk.state
                                      & (1<<MD_DISK_FAULTY)))
@@ -990,7 +990,7 @@ int Assemble(struct supertype *st, char *mddev,
        if (content->reshape_active) {
                int err = 0;
                int *fdlist = malloc(sizeof(int)* bestcnt);
-               if (verbose)
+               if (verbose > 0)
                        fprintf(stderr, Name ":%s has an active reshape - checking "
                                "if critical section needs to be restored\n",
                                chosen_name);
@@ -1008,7 +1008,7 @@ int Assemble(struct supertype *st, char *mddev,
                                fdlist[i] = -1;
                }
                if (!err)
-                       err = Grow_restart(st, content, fdlist, bestcnt, backup_file, verbose);
+                       err = Grow_restart(st, content, fdlist, bestcnt, backup_file, verbose > 0);
                while (i>0) {
                        i--;
                        if (fdlist[i]>=0) close(fdlist[i]);
@@ -1286,7 +1286,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
                sysfs_free(sra);
 
        for (dev = content->devs; dev; dev = dev->next)
-               if (sysfs_add_disk(content, dev, 1) == 0)
+               if (sysfs_add_disk(content, dev) == 0)
                        working++;
                else if (errno == EEXIST)
                        preexist++;