summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-11-22 19:35:25 +1100
committerNeilBrown <neilb@suse.de>2010-11-22 19:35:25 +1100
commita5d85af748aafe3e3830b9d16faa5c92e783b171 (patch)
tree226da96fa25afdd3bc97ead7e91b5e59b10a8e8f /util.c
parentf94c116f56cb821bfd619481d94fcd78ab8b53c0 (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 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index c9976218..27989636 100644
--- a/util.c
+++ b/util.c
@@ -500,7 +500,7 @@ int check_raid(int fd, char *name)
/* Looks like a raid array .. */
fprintf(stderr, Name ": %s appears to be part of a raid array:\n",
name);
- st->ss->getinfo_super(st, &info);
+ st->ss->getinfo_super(st, &info, NULL);
st->ss->free_super(st);
crtime = info.array.ctime;
level = map_num(pers, info.array.level);
@@ -1140,7 +1140,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
rv = ss->load_super(st, fd, NULL);
if (rv == 0) {
struct mdinfo info;
- st->ss->getinfo_super(st, &info);
+ st->ss->getinfo_super(st, &info, NULL);
if (bestsuper == -1 ||
besttime < info.array.ctime) {
bestsuper = i;