diff options
author | NeilBrown <neilb@suse.de> | 2010-11-22 19:35:25 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-22 19:35:25 +1100 |
commit | a5d85af748aafe3e3830b9d16faa5c92e783b171 (patch) | |
tree | 226da96fa25afdd3bc97ead7e91b5e59b10a8e8f /Assemble.c | |
parent | f94c116f56cb821bfd619481d94fcd78ab8b53c0 (diff) |
get_info_super: report which other devices are thought to be working/failed.
To accurately detect when an array has been split and is now being
recombined, we need to track which other devices each thinks is
working.
We should never include a device in an array if it thinks that the
primary device has failed.
This patch just allows get_info_super to return a list of devices
and whether they are thought to be working or not.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -283,7 +283,7 @@ int Assemble(struct supertype *st, char *mddev, } else { content = &info; memset(content, 0, sizeof(*content)); - tst->ss->getinfo_super(tst, content); + tst->ss->getinfo_super(tst, content, NULL); } if (dfd >= 0) close(dfd); @@ -520,7 +520,7 @@ int Assemble(struct supertype *st, char *mddev, /* Now need to open the array device. Use create_mddev */ if (content == &info) - st->ss->getinfo_super(st, content); + st->ss->getinfo_super(st, content, NULL); trustworthy = FOREIGN; name = content->name; @@ -643,7 +643,7 @@ int Assemble(struct supertype *st, char *mddev, close(mdfd); return 1; } - tst->ss->getinfo_super(tst, content); + tst->ss->getinfo_super(tst, content, NULL); memcpy(content->uuid, ident->uuid, 16); strcpy(content->name, ident->name); @@ -704,7 +704,7 @@ int Assemble(struct supertype *st, char *mddev, close(mdfd); return 1; } - tst->ss->getinfo_super(tst, content); + tst->ss->getinfo_super(tst, content, NULL); tst->ss->free_super(tst); close(dfd); } @@ -798,7 +798,7 @@ int Assemble(struct supertype *st, char *mddev, if (update && strcmp(update, "byteorder")==0) st->minor_version = 90; - st->ss->getinfo_super(st, content); + st->ss->getinfo_super(st, content, NULL); clean = content->array.state & 1; /* now we have some devices that might be suitable. @@ -955,7 +955,7 @@ int Assemble(struct supertype *st, char *mddev, close(mdfd); return 1; } - st->ss->getinfo_super(st, content); + st->ss->getinfo_super(st, content, NULL); #ifndef MDASSEMBLE sysfs_init(content, mdfd, 0); #endif |