diff options
author | NeilBrown <neilb@suse.de> | 2011-03-15 14:53:00 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-15 14:53:00 +1100 |
commit | 77632af90637004deac013d1716727b15094b3ee (patch) | |
tree | 3a4b5f2436f959f2cc028e0ab3624dffbc6a5b0e | |
parent | 0c4f6e378b4fd9518e1037caab4babacf41ea6c8 (diff) | |
download | mdadm-77632af90637004deac013d1716727b15094b3ee.tar.gz |
ddf: Don't consider 'dl' entries with state_fd < 0
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>
-rw-r--r-- | super-ddf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/super-ddf.c b/super-ddf.c index be15e43..96d75ea 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -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) |