diff options
author | NeilBrown <neilb@suse.de> | 2011-10-26 00:54:39 (GMT) |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-10-26 00:54:39 (GMT) |
commit | d890fa2b0586b6177b119643ff66932127d58afa (patch) | |
tree | 48dfb1c192274002fc045996f49915a4d9af3bf8 /drivers/md/raid5.c | |
parent | 355840e7a7e56bb2834fd3b0da64da5465f8aeaa (diff) | |
download | linux-d890fa2b0586b6177b119643ff66932127d58afa.tar.xz |
md: Fix some bugs in recovery_disabled handling.
In 3.0 we changed the way recovery_disabled was handle so that instead
of testing against zero, we test an mddev-> value against a conf->
value.
Two problems:
1/ one place in raid1 was missed and still sets to '1'.
2/ We didn't explicitly set the conf-> value at array creation
time.
It defaulted to '0' just like the mddev value does so they
could appear equal and thus disable recovery.
This did not affect normal 'md' as it calls bind_rdev_to_array
which changes the mddev value. However the dmraid interface
doesn't call this and so doesn't change ->recovery_disabled; so at
array start all recovery is incorrectly disabled.
So initialise the 'conf' value to one less that the mddev value, so
the will only be the same when explicitly set that way.
Reported-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 521bf26..f6fe053 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4591,6 +4591,7 @@ static struct r5conf *setup_conf(struct mddev *mddev) atomic_set(&conf->preread_active_stripes, 0); atomic_set(&conf->active_aligned_reads, 0); conf->bypass_threshold = BYPASS_THRESHOLD; + conf->recovery_disabled = mddev->recovery_disabled - 1; conf->raid_disks = mddev->raid_disks; if (mddev->reshape_position == MaxSector) |