From: NeilBrown Date: Tue, 15 Mar 2011 03:53:00 +0000 (+1100) Subject: ddf: Don't consider 'dl' entries with state_fd < 0 X-Git-Tag: mdadm-3.1.5~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77632af90637004deac013d1716727b15094b3ee;p=thirdparty%2Fmdadm.git 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 --- diff --git a/super-ddf.c b/super-ddf.c index be15e43e..96d75ea8 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)