summaryrefslogtreecommitdiffstats
path: root/Manage.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-03-09 06:20:18 +0100
committerJes Sorensen <Jes.Sorensen@redhat.com>2016-03-10 17:44:21 +0100
commitd31d0f5218e96a2a3a0c9b4418bb387ec211dd0d (patch)
tree18755de411d52b8d7acb7ad1d3138d869489c0cd /Manage.c
parentddf: use 64bit 'size', not 32bit 'info->size' for create. (diff)
downloadmdadm-d31d0f5218e96a2a3a0c9b4418bb387ec211dd0d.tar.xz
mdadm-d31d0f5218e96a2a3a0c9b4418bb387ec211dd0d.zip
Fix regression during add devices
Commit d180d2aa2a17 ("Manage: fix test for 'is array failed'.") introduced a regression which would not allow to re-add new drivers to a failed array. Fixes: d180d2aa2a17 ("Manage: fix test for 'is array failed'.") Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: Coly Li <colyli@suse.de> Cc: Neil Brown <neilb@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'Manage.c')
-rw-r--r--Manage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Manage.c b/Manage.c
index ab4ac09f..e3d46f3b 100644
--- a/Manage.c
+++ b/Manage.c
@@ -880,10 +880,10 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv,
continue;
if (disc.major == 0 && disc.minor == 0)
continue;
- found++;
if (!(disc.state & (1<<MD_DISK_SYNC)))
continue;
avail[disc.raid_disk] = 1;
+ found++;
}
array_failed = !enough(array->level, array->raid_disks,
array->layout, 1, avail);