]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-ddf.c
(no commit message)
[thirdparty/mdadm.git] / super-ddf.c
index 3e30229536845ae2dd469af0157fa9b36403cf74..3feea57796e1242201095ca85659b9279902a1ff 100644 (file)
@@ -1260,7 +1260,11 @@ static int match_home_ddf(struct supertype *st, char *homehost)
         * the hostname
         */
        struct ddf_super *ddf = st->sb;
-       int len = strlen(homehost);
+       int len;
+
+       if (!homehost)
+               return 0;
+       len = strlen(homehost);
 
        return (memcmp(ddf->controller.guid, T10, 8) == 0 &&
                len < sizeof(ddf->controller.vendor_data) &&
@@ -1369,6 +1373,7 @@ static void getinfo_super_ddf(struct supertype *st, struct mdinfo *info)
        info->disk.state = (1 << MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE);
 
 
+       info->recovery_start = MaxSector;
        info->reshape_active = 0;
        info->name[0] = 0;
 
@@ -1427,7 +1432,9 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info)
 
        info->container_member = ddf->currentconf->vcnum;
 
+       info->recovery_start = MaxSector;
        info->resync_start = 0;
+       info->reshape_active = 0;
        if (!(ddf->virt->entries[info->container_member].state
              & DDF_state_inconsistent)  &&
            (ddf->virt->entries[info->container_member].init_state
@@ -2406,8 +2413,12 @@ static int write_init_super_ddf(struct supertype *st)
 
                /* FIXME I need to close the fds! */
                return 0;
-       } else 
+       } else {        
+               struct dl *d;
+               for (d = ddf->dlist; d; d=d->next)
+                       while (Kill(d->devname, NULL, 0, 1, 1) == 0);
                return __write_init_super_ddf(st, 1);
+       }
 }
 
 #endif