lkml.org 
[lkml]   [2006]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 003 of 10] 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>

### Diffstat output
./drivers/md/raid5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff ./drivers/md/raid5.c~current~ ./drivers/md/raid5.c
--- ./drivers/md/raid5.c~current~ 2006-06-01 15:03:29.000000000 +1000
+++ ./drivers/md/raid5.c 2006-06-01 15:05:28.000000000 +1000
@@ -2858,7 +2858,7 @@ static inline sector_t sync_request(mdde
* to resync, then assert that we are finished, because there is
* nothing we can do.
*/
- if (mddev->degraded >= (data_disks - raid_disks) &&
+ if (mddev->degraded >= conf->max_degraded &&
test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
sector_t rv = (mddev->size << 1) - sector_nr;
*skipped = 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-06-01 07:16    [W:0.048 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site