]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
ddf: fixed 'working_disks' reported by container_content.
authorNeilBrown <neilb@suse.de>
Tue, 7 Apr 2009 07:41:55 +0000 (17:41 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 7 Apr 2009 07:41:55 +0000 (17:41 +1000)
The 'work_disks' number should be the number that is expected, not the
number found so far.   This is needed for Incremental assembly to
start the array at the right time.

Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index 8ab359729abbe4d90cc79daff37a07f889992101..93c8f06d59acd7070066e7213d16cc1edbbfda0e 100644 (file)
@@ -2918,6 +2918,8 @@ static struct mdinfo *container_content_ddf(struct supertype *st)
                        if (vc->conf.phys_refnum[i] == 0xFFFFFFFF)
                                continue;
 
+                       this->array.working_disks++;
+
                        for (d = ddf->dlist; d ; d=d->next)
                                if (d->disk.refnum == vc->conf.phys_refnum[i])
                                        break;
@@ -2925,8 +2927,6 @@ static struct mdinfo *container_content_ddf(struct supertype *st)
                                /* Haven't found that one yet, maybe there are others */
                                continue;
 
-                       this->array.working_disks++;
-
                        dev = malloc(sizeof(*dev));
                        memset(dev, 0, sizeof(*dev));
                        dev->next = this->devs;