]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
ddf: Don't consider 'dl' entries with state_fd < 0
authorNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 03:53:00 +0000 (14:53 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 03:53:00 +0000 (14:53 +1100)
These have been marked as invalid (recently failed) so
don't trust the major/minor associated with them.

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

index be15e43ebc9b9f74f1a94bd7ada1d564e9531162..96d75ea82a031d423e6fe490af119e0abb93a770 100644 (file)
@@ -3191,7 +3191,8 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
 
        /* and find the 'dl' entry corresponding to that. */
        for (dl = ddf->dlist; dl; dl = dl->next)
-               if (mdi->disk.major == dl->major &&
+               if (mdi->state_fd >= 0 &&
+                   mdi->disk.major == dl->major &&
                    mdi->disk.minor == dl->minor)
                        break;
        if (!dl)