diff options
author | Neil Brown <neilb@suse.de> | 2005-09-12 04:57:52 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-09-12 04:57:52 +0000 |
commit | 265e0f17317e6d23864263c04ae581b35f946b5e (patch) | |
tree | 0b368c095b4cfa6081a1d74a8ae44a288d09e511 /super1.c | |
parent | 63f8c4c76bff7d45e9403908ed3591edac7a6e4f (diff) | |
download | mdadm-265e0f17317e6d23864263c04ae581b35f946b5e.tar.gz mdadm-265e0f17317e6d23864263c04ae581b35f946b5e.tar.xz mdadm-265e0f17317e6d23864263c04ae581b35f946b5e.zip |
Fix assembling of raid10 in the face of missing devices.
We now check if enough devices are present properly, so
--force can be used to good effect.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -180,6 +180,11 @@ static void examine_super1(void *sbv) c = map_num(r5layout, __le32_to_cpu(sb->layout)); printf(" Layout : %s\n", c?c:"-unknown-"); } + if (__le32_to_cpu(sb->level) == 10) { + int lo = __le32_to_cpu(sb->layout); + printf(" Layout : near=%d, far=%d\n", + lo&255, (lo>>8)&255); + } switch(__le32_to_cpu(sb->level)) { case 0: case 4: @@ -290,6 +295,7 @@ static void getinfo_super1(struct mdinfo *info, mddev_ident_t ident, void *sbv) info->array.patch_version = 0; info->array.raid_disks = __le32_to_cpu(sb->raid_disks); info->array.level = __le32_to_cpu(sb->level); + info->array.layout = __le32_to_cpu(sb->layout); info->array.md_minor = -1; info->array.ctime = __le64_to_cpu(sb->ctime); |