]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Incremental: Use md_array_active() to determine state of array
authorJes Sorensen <jsorensen@fb.com>
Tue, 2 May 2017 14:36:51 +0000 (10:36 -0400)
committerJes Sorensen <jsorensen@fb.com>
Tue, 2 May 2017 14:36:51 +0000 (10:36 -0400)
One less call to md_get_array_info()

Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Incremental.c

index 4789e36ce8a7d5f5b126efb9a94eefd7fcf2892d..8909f2fec70d940de3268c8d8374970523058b8d 100644 (file)
@@ -99,7 +99,6 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
        int active_disks;
        int trustworthy;
        char *name_to_use;
-       mdu_array_info_t ainf;
        struct dev_policy *policy = NULL;
        struct map_ent target_array;
        int have_target;
@@ -551,7 +550,7 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
        /*   + add any bitmap file  */
        /*   + start the array (auto-readonly). */
 
-       if (md_get_array_info(mdfd, &ainf) == 0) {
+       if (md_array_active(mdfd)) {
                if (c->export) {
                        printf("MD_STARTED=already\n");
                } else if (c->verbose >= 0)