diff options
author | NeilBrown <neilb@suse.de> | 2006-06-26 03:27:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:39 -0400 |
commit | 3285edf152cefff482f95ceb90b1bd46ac169df1 (patch) | |
tree | 88dd6e57f6405d71c621f136d236e1dde599e5a7 /drivers | |
parent | b3cc9ec76ba44d010f4c820c4608b91aaf28a0b9 (diff) |
[PATCH] md: Fix bug that stops raid5 resync from happening
As data_disks is *less* than raid_disks, the current test here is obviously
wrong. And as the difference is already available in conf->max_degraded, it
makes much more sense to use that.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/raid5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 6d3a2a09cd90..f920e50ea124 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -2858,7 +2858,7 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski | |||
2858 | * to resync, then assert that we are finished, because there is | 2858 | * to resync, then assert that we are finished, because there is |
2859 | * nothing we can do. | 2859 | * nothing we can do. |
2860 | */ | 2860 | */ |
2861 | if (mddev->degraded >= (data_disks - raid_disks) && | 2861 | if (mddev->degraded >= conf->max_degraded && |
2862 | test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { | 2862 | test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { |
2863 | sector_t rv = (mddev->size << 1) - sector_nr; | 2863 | sector_t rv = (mddev->size << 1) - sector_nr; |
2864 | *skipped = 1; | 2864 | *skipped = 1; |