diff options
author | NeilBrown <neilb@suse.de> | 2009-10-16 00:55:25 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-10-16 00:55:25 -0400 |
commit | 1442577bf6da1a31ae6555212202be9a2cec5642 (patch) | |
tree | 58843618e1fe59ac6c07dd5651dbb3f4a6355106 /drivers/md | |
parent | 7ca263cdf8cf74d0f1c6f48d07d556de92e3bec9 (diff) |
Revert "md: do not progress the resync process if the stripe was blocked"
This reverts commit df10cfbc4d7ab93260d997df754219d390d62a9d.
This patch was based on a misunderstanding and risks introducing a busy-wait loop.
So revert it.
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 94829804ab7f..ec14ff5b508a 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -2896,7 +2896,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh, | |||
2896 | * | 2896 | * |
2897 | */ | 2897 | */ |
2898 | 2898 | ||
2899 | static bool handle_stripe5(struct stripe_head *sh) | 2899 | static void handle_stripe5(struct stripe_head *sh) |
2900 | { | 2900 | { |
2901 | raid5_conf_t *conf = sh->raid_conf; | 2901 | raid5_conf_t *conf = sh->raid_conf; |
2902 | int disks = sh->disks, i; | 2902 | int disks = sh->disks, i; |
@@ -3167,11 +3167,9 @@ static bool handle_stripe5(struct stripe_head *sh) | |||
3167 | ops_run_io(sh, &s); | 3167 | ops_run_io(sh, &s); |
3168 | 3168 | ||
3169 | return_io(return_bi); | 3169 | return_io(return_bi); |
3170 | |||
3171 | return blocked_rdev == NULL; | ||
3172 | } | 3170 | } |
3173 | 3171 | ||
3174 | static bool handle_stripe6(struct stripe_head *sh) | 3172 | static void handle_stripe6(struct stripe_head *sh) |
3175 | { | 3173 | { |
3176 | raid5_conf_t *conf = sh->raid_conf; | 3174 | raid5_conf_t *conf = sh->raid_conf; |
3177 | int disks = sh->disks; | 3175 | int disks = sh->disks; |
@@ -3455,17 +3453,14 @@ static bool handle_stripe6(struct stripe_head *sh) | |||
3455 | ops_run_io(sh, &s); | 3453 | ops_run_io(sh, &s); |
3456 | 3454 | ||
3457 | return_io(return_bi); | 3455 | return_io(return_bi); |
3458 | |||
3459 | return blocked_rdev == NULL; | ||
3460 | } | 3456 | } |
3461 | 3457 | ||
3462 | /* returns true if the stripe was handled */ | 3458 | static void handle_stripe(struct stripe_head *sh) |
3463 | static bool handle_stripe(struct stripe_head *sh) | ||
3464 | { | 3459 | { |
3465 | if (sh->raid_conf->level == 6) | 3460 | if (sh->raid_conf->level == 6) |
3466 | return handle_stripe6(sh); | 3461 | handle_stripe6(sh); |
3467 | else | 3462 | else |
3468 | return handle_stripe5(sh); | 3463 | handle_stripe5(sh); |
3469 | } | 3464 | } |
3470 | 3465 | ||
3471 | static void raid5_activate_delayed(raid5_conf_t *conf) | 3466 | static void raid5_activate_delayed(raid5_conf_t *conf) |
@@ -4277,9 +4272,7 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski | |||
4277 | clear_bit(STRIPE_INSYNC, &sh->state); | 4272 | clear_bit(STRIPE_INSYNC, &sh->state); |
4278 | spin_unlock(&sh->lock); | 4273 | spin_unlock(&sh->lock); |
4279 | 4274 | ||
4280 | /* wait for any blocked device to be handled */ | 4275 | handle_stripe(sh); |
4281 | while (unlikely(!handle_stripe(sh))) | ||
4282 | ; | ||
4283 | release_stripe(sh); | 4276 | release_stripe(sh); |
4284 | 4277 | ||
4285 | return STRIPE_SECTORS; | 4278 | return STRIPE_SECTORS; |