]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
ddf: fix auto-allocation problem.
authorNeilBrown <neilb@suse.de>
Thu, 22 Dec 2011 22:04:59 +0000 (09:04 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 22 Dec 2011 22:04:59 +0000 (09:04 +1100)
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>
super-ddf.c

index d3f8b2935c8215fd12702d573da76bfc22fd278f..b5b0b42205a2bc070c2949936aa50d7e37e07d1b 100644 (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)