summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-12-18 13:49:30 +1100
committerNeilBrown <neilb@suse.com>2015-12-18 13:49:30 +1100
commit9e70a453edde9571d84372ea5c13a1fab219caac (patch)
tree878994ef31c26033a982c79dafa9dcfe8d1455c3 /Detail.c
parent81a8a6941510b28fa9d6862e6bf42bbd48ee92d3 (diff)
downloadmdadm-9e70a453edde9571d84372ea5c13a1fab219caac.tar.gz
Detail: report correct raid-disk for removed drives.
Back in Commit: 8057db46a15d ("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>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Detail.c b/Detail.c
index 200f65f..cbf1f9a 100644
--- a/Detail.c
+++ b/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;