ddf: fix auto-allocation problem.

We need to check every disk to see if it has a particular amount of
space spare, not just every subsequent disk.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-12-23 09:04:59 +11:00
parent ba3903d416
commit 7b80ad6af2
1 changed files with 1 additions and 1 deletions

View File

@ -2557,7 +2557,7 @@ static int reserve_space(struct supertype *st, int raiddisks,
continue;
/* This is bigger than 'size', see if there are enough */
cnt = 0;
for (dl2 = dl; dl2 ; dl2=dl2->next)
for (dl2 = ddf->dlist; dl2 ; dl2=dl2->next)
if (dl2->esize >= dl->esize)
cnt++;
if (cnt >= raiddisks)