]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: write_init_super_ddf: don't zero superblocks for subarrays
authormwilck@arcor.de <mwilck@arcor.de>
Mon, 8 Jul 2013 21:50:39 +0000 (23:50 +0200)
committerNeilBrown <neilb@suse.de>
Wed, 10 Jul 2013 00:40:18 +0000 (10:40 +1000)
commit d682f344 inserted this call to "Kill" in write_init_super_ddf:

    "Matching the functionality already in super0 and super1, when
    we first create a container, remove any other recognisable metadata to
    ensure it doesn't cause confusion."

But we should do this only at first container creation, not when
subarrays are created later.

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

index 8f60b72f61fa086c7f09e96678e7fdc246a624ac..87584fa5ecb9fb06609e8590398b033070a6a9e8 100644 (file)
@@ -2964,8 +2964,9 @@ static int write_init_super_ddf(struct supertype *st)
                return 0;
        } else {
                struct dl *d;
-               for (d = ddf->dlist; d; d=d->next)
-                       while (Kill(d->devname, NULL, 0, -1, 1) == 0);
+               if (!currentconf)
+                       for (d = ddf->dlist; d; d=d->next)
+                               while (Kill(d->devname, NULL, 0, -1, 1) == 0);
                return __write_init_super_ddf(st);
        }
 }