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 /Create.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 'Create.c')
-rw-r--r-- | Create.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -614,7 +614,7 @@ int Create(struct supertype *st, char *mddev, total_slots = info.array.nr_disks; sysfs_init(&info, mdfd, 0); - st->ss->getinfo_super(st, &info); + st->ss->getinfo_super(st, &info, NULL); if (did_default && verbose >= 0) { if (is_subarray(info.text_version)) { @@ -797,7 +797,7 @@ int Create(struct supertype *st, char *mddev, ioctl(mdfd, STOP_ARRAY, NULL); goto abort; } - st->ss->getinfo_super(st, inf); + st->ss->getinfo_super(st, inf, NULL); safe_mode_delay = inf->safe_mode_delay; if (have_container && verbose > 0) @@ -842,7 +842,7 @@ int Create(struct supertype *st, char *mddev, * again returns container info. */ map_lock(&map); - st->ss->getinfo_super(st, &info_new); + st->ss->getinfo_super(st, &info_new, NULL); if (st->ss->external && level != LEVEL_CONTAINER && !same_uuid(info_new.uuid, info.uuid, 0)) { map_update(&map, fd2devnum(mdfd), @@ -857,7 +857,7 @@ int Create(struct supertype *st, char *mddev, if (me) { char *path = strdup(me->path); - st->ss->getinfo_super(st, &info_new); + st->ss->getinfo_super(st, &info_new, NULL); map_update(&map, st->container_dev, info_new.text_version, info_new.uuid, path); |