Detail: report correct raid-disk for removed drives.
Back in
Commit: 8057db46a1
("Detail: fix handling of 'disks' array.")
when we doubled the size of the 'disks' array to handle primary and
replacement, we should have halved the setting of the default raid_disk
number.
Reported-by: Coly Li <colyli@suse.de>
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
parent
81a8a69415
commit
9e70a453ed
2
Detail.c
2
Detail.c
|
@ -299,7 +299,7 @@ int Detail(char *dev, struct context *c)
|
|||
for (d = 0; d < max_disks * 2; d++) {
|
||||
disks[d].state = (1<<MD_DISK_REMOVED);
|
||||
disks[d].major = disks[d].minor = 0;
|
||||
disks[d].number = disks[d].raid_disk = d;
|
||||
disks[d].number = disks[d].raid_disk = d/2;
|
||||
}
|
||||
|
||||
next = array.raid_disks*2;
|
||||
|
|
Loading…
Reference in New Issue