From: Song Liu Date: Fri, 12 Aug 2016 00:14:13 +0000 (-0700) Subject: mdadm: put journal device in right place of --detail X-Git-Tag: mdadm-4.0~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=690e46c32069efd6d8da667f2a23bdb00c233bda;p=thirdparty%2Fmdadm.git mdadm: put journal device in right place of --detail When there is failed HDDs, journal device showed in wrong place of --detail: Number Major Minor RaidDevice State 4 8 24 - journal /dev/sdb8 1 8 18 1 active sync /dev/sdb2 2 8 19 2 active sync /dev/sdb3 3 8 21 3 active sync /dev/sdb5 0 8 17 - faulty /dev/sdb1 This patch fixed the output as: Number Major Minor RaidDevice State - 0 0 0 removed 1 8 18 1 active sync /dev/sdb2 2 8 19 2 active sync /dev/sdb3 3 8 21 3 active sync /dev/sdb5 0 8 17 - faulty /dev/sdb1 4 8 24 - journal /dev/sdb8 Reported-by: Yi Zhang Signed-off-by: Song Liu Signed-off-by: Shaohua Li Signed-off-by: Jes Sorensen --- diff --git a/Detail.c b/Detail.c index 7a984c83..925e4794 100644 --- a/Detail.c +++ b/Detail.c @@ -323,7 +323,8 @@ int Detail(char *dev, struct context *c) if (disk.major == 0 && disk.minor == 0) continue; if (disk.raid_disk >= 0 && disk.raid_disk < array.raid_disks - && disks[disk.raid_disk*2].state == (1<= 0 && disk.raid_disk < array.raid_disks && disks[disk.raid_disk*2+1].state == (1<