summaryrefslogtreecommitdiffstats
path: root/Assemble.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-05-15 16:48:19 +1000
committerNeil Brown <neilb@suse.de>2008-05-15 16:48:19 +1000
commit598f0d58ac3544e25f90f2d34337e15764f4d877 (patch)
tree9cfe332da8c0deee87065a14014a2904ee991902 /Assemble.c
parenta19c88b83db3cc25affb75fe2d5531c964379d96 (diff)
downloadmdadm-598f0d58ac3544e25f90f2d34337e15764f4d877.tar.gz
mdadm-598f0d58ac3544e25f90f2d34337e15764f4d877.tar.xz
mdadm-598f0d58ac3544e25f90f2d34337e15764f4d877.zip
Can now mostly assemble DDF arrays
Diffstat (limited to 'Assemble.c')
-rw-r--r--Assemble.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/Assemble.c b/Assemble.c
index 16dec24..f10491b 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -918,6 +918,10 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
if (fd < 0)
rv = 1;
else {
+ devices[j].i.disk.number =
+ devices[j].i.disk.raid_disk;
+ st->ss->getinfo_super_n(st,
+ &devices[j].i);
rv = sysfs_add_disk(sra, fd,
&devices[j].i);
close(fd);
@@ -948,6 +952,21 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
i, mddev);
}
+ if (info.array.level == LEVEL_CONTAINER) {
+ if (verbose >= 0) {
+ fprintf(stderr, Name ": Container %s has been "
+ "assembled with %d drive%s",
+ mddev, okcnt, okcnt==1?"":"s");
+ if (okcnt < info.array.raid_disks)
+ fprintf(stderr, " (out of %d)",
+ info.array.raid_disks);
+ fprintf(stderr, "\n");
+ }
+ if (must_close)
+ close(mdfd);
+ return 0;
+ }
+
if (runstop == 1 ||
(runstop <= 0 &&
( enough(info.array.level, info.array.raid_disks,
@@ -970,7 +989,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
/* There is a nasty race with 'mdadm --monitor'.
* If it opens this device before we close it,
* it gets an incomplete open on which IO
- * doesn't work and the capacity if wrong.
+ * doesn't work and the capacity is
+ * wrong.
* If we reopen (to check for layered devices)
* before --monitor closes, we loose.
*