]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
imsm: enforce "all member disks must be members of all arrays"
[thirdparty/mdadm.git] / Assemble.c
index 3c55b1ecc5853541976a1cd049a3ebe13569f4c8..4d12edc019f2a29f4d7a2f5b125a526c5c848595 100644 (file)
@@ -168,7 +168,6 @@ int Assemble(struct supertype *st, char *mddev,
        mddev_dev_t tmpdev;
        struct mdinfo info;
        struct mdinfo *content = NULL;
-       mdu_array_info_t tmp_inf;
        char *avail;
        int nextspare = 0;
        char *name = NULL;
@@ -525,7 +524,7 @@ int Assemble(struct supertype *st, char *mddev,
                close(mdfd);
                return 1;
        }
-       if (ioctl(mdfd, GET_ARRAY_INFO, &tmp_inf)==0) {
+       if (mddev_busy(fd2devnum(mdfd))) {
                fprintf(stderr, Name ": %s already active, cannot restart it!\n",
                        mddev);
                for (tmpdev = devlist ;