Grow: fix bug when multiple arrays present.

commit 1f9b0e2845
    Grow - be careful about 'delayed' reshapes.

Introduced a bug where a list of devices longer than 1
would cause an infinite loop.  Oops.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2012-11-22 08:57:25 +11:00
parent 04463b2f58
commit ae0dcfbdb2
1 changed files with 1 additions and 1 deletions

2
Grow.c
View File

@ -2947,7 +2947,7 @@ started:
struct mdstat_ent *mds, *m;
delayed = 0;
mds = mdstat_read(0, 0);
for (m = mds; m; m = mds->next)
for (m = mds; m; m = m->next)
if (m->devnum == devname2devnum(sra->sys_name)) {
if (m->resync &&
m->percent == RESYNC_DELAYED)