diff options
author | Pawel Baldysiak <pawel.baldysiak@intel.com> | 2014-06-30 12:22:22 +0000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-07-08 11:39:23 +1000 |
commit | 0c21b485e4beb7bcfe631412a231f7c1ea1067bc (patch) | |
tree | e823b8b5ad90ac368616e065cd7b73fc4f046daa /Assemble.c | |
parent | 120ec6f7b96455e42bdfa9131c0c9026c57eaf19 (diff) |
IMSM: Add warning message when assemble spanned container
Due to several changes in code assemble with disks
spanned between different controllers can be obtained
in some cases. After IMSM container will be assembled, check HBA of
disks, and print proper warning if mismatch is detected.
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Assemble.c')
-rw-r--r-- | Assemble.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1001,6 +1001,22 @@ static int start_array(int mdfd, content->array.raid_disks); fprintf(stderr, "\n"); } + + if (st->ss->validate_container) { + struct mdinfo *devices_list; + struct mdinfo *info_devices = xmalloc(sizeof(struct mdinfo)*(okcnt+sparecnt)); + unsigned int count; + devices_list = NULL; + for (count = 0; count < okcnt+sparecnt; count++) { + info_devices[count] = devices[count].i; + info_devices[count].next = devices_list; + devices_list = &info_devices[count]; + } + if (st->ss->validate_container(devices_list)) + pr_err("Mismatch detected!\n"); + free(info_devices); + } + st->ss->free_super(st); sysfs_uevent(content, "change"); if (err_ok && okcnt < (unsigned)content->array.raid_disks) |