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:
NeilBrown 2015-12-18 13:49:30 +11:00
parent 81a8a69415
commit 9e70a453ed
1 changed files with 1 additions and 1 deletions

View File

@ -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;