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:
parent
ba3903d416
commit
7b80ad6af2
|
@ -2557,7 +2557,7 @@ static int reserve_space(struct supertype *st, int raiddisks,
|
||||||
continue;
|
continue;
|
||||||
/* This is bigger than 'size', see if there are enough */
|
/* This is bigger than 'size', see if there are enough */
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
for (dl2 = dl; dl2 ; dl2=dl2->next)
|
for (dl2 = ddf->dlist; dl2 ; dl2=dl2->next)
|
||||||
if (dl2->esize >= dl->esize)
|
if (dl2->esize >= dl->esize)
|
||||||
cnt++;
|
cnt++;
|
||||||
if (cnt >= raiddisks)
|
if (cnt >= raiddisks)
|
||||||
|
|
Loading…
Reference in New Issue