]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Incremental - fix small bug in count_active.
authorNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 08:35:25 +0000 (19:35 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 08:35:25 +0000 (19:35 +1100)
If the first device found has a much smaller event count than a
subsequent device, that device will not be entered in the 'avail'
array properly.

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

index 23f59800d38ecadac827218b963e8c672c816d2c..e74e52b560ff34a70ea37a2e82be9c428a4c4e40 100644 (file)
@@ -708,6 +708,7 @@ static int count_active(struct supertype *st, int mdfd, char **availp,
                                cnt = 1; cnt1 = 0;
                                memset(avail, 0, info.disk.raid_disk);
                                max_events = info.events;
+                               avail[info.disk.raid_disk] = 2;
                                st->ss->getinfo_super(st, bestinfo, NULL);
                        }
                }