Fix incorrect test in super1.c Refernces: bnc#699667 The dev_roles array has 16bit fields, we need to byteswap 'raid_disk' as a 16bit number before comparing against dev_roles. This bug only affect big-endian machines and can cause a meaningless warning: wrong state in superblock and could in unusual circumstances cause array assembly to fail. Signed-off-by: NeilBrown --- super1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- mdadm-3.0.3.orig/super1.c +++ mdadm-3.0.3/super1.c @@ -659,7 +659,7 @@ static int update_super1(struct supertyp int d = info->disk.number; int want; if (info->disk.state == 6) - want = __cpu_to_le32(info->disk.raid_disk); + want = __cpu_to_le16(info->disk.raid_disk); else want = 0xFFFF; if (sb->dev_roles[d] != want) {