summaryrefslogtreecommitdiff
path: root/super-ddf.c
diff options
context:
space:
mode:
authormwilck@arcor.de <mwilck@arcor.de>2013-07-08 23:50:39 +0200
committerNeilBrown <neilb@suse.de>2013-07-10 10:40:18 +1000
commit19041058d2e3414db2bff4c2933224b10b65b0a8 (patch)
treed6788632868fcedf9cef421a42dde37de5834e71 /super-ddf.c
parent24a216bf408db4ec61ec6f735d1eb84a0618bfbb (diff)
DDF: write_init_super_ddf: don't zero superblocks for subarrays
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>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 8f60b72f..87584fa5 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -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);
}
}