Incremental - fix small bug in count_active.

If the first device found has a much smaller event count than a
subsequent device, that device will not be entered in the 'avail'
array properly.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-11-22 19:35:25 +11:00
parent 02e7c5b75c
commit 1d1a9f87a4
1 changed files with 1 additions and 0 deletions

View File

@ -708,6 +708,7 @@ static int count_active(struct supertype *st, int mdfd, char **availp,
cnt = 1; cnt1 = 0;
memset(avail, 0, info.disk.raid_disk);
max_events = info.events;
avail[info.disk.raid_disk] = 2;
st->ss->getinfo_super(st, bestinfo, NULL);
}
}