Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107396
b: refs/heads/master
c: df10cfb
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams committed Jul 29, 2008
1 parent 2650f9c commit 6831b94
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8e64406a037a64444175730294e449c9e21f5ec
refs/heads/master: df10cfbc4d7ab93260d997df754219d390d62a9d
19 changes: 13 additions & 6 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2507,7 +2507,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
*
*/

static void handle_stripe5(struct stripe_head *sh)
static bool handle_stripe5(struct stripe_head *sh)
{
raid5_conf_t *conf = sh->raid_conf;
int disks = sh->disks, i;
Expand Down Expand Up @@ -2755,9 +2755,11 @@ static void handle_stripe5(struct stripe_head *sh)
ops_run_io(sh, &s);

return_io(return_bi);

return blocked_rdev == NULL;
}

static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page)
static bool handle_stripe6(struct stripe_head *sh, struct page *tmp_page)
{
raid6_conf_t *conf = sh->raid_conf;
int disks = sh->disks;
Expand Down Expand Up @@ -2968,14 +2970,17 @@ static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page)
ops_run_io(sh, &s);

return_io(return_bi);

return blocked_rdev == NULL;
}

static void handle_stripe(struct stripe_head *sh, struct page *tmp_page)
/* returns true if the stripe was handled */
static bool handle_stripe(struct stripe_head *sh, struct page *tmp_page)
{
if (sh->raid_conf->level == 6)
handle_stripe6(sh, tmp_page);
return handle_stripe6(sh, tmp_page);
else
handle_stripe5(sh);
return handle_stripe5(sh);
}


Expand Down Expand Up @@ -3691,7 +3696,9 @@ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *ski
clear_bit(STRIPE_INSYNC, &sh->state);
spin_unlock(&sh->lock);

handle_stripe(sh, NULL);
/* wait for any blocked device to be handled */
while(unlikely(!handle_stripe(sh, NULL)))
;
release_stripe(sh);

return STRIPE_SECTORS;
Expand Down

0 comments on commit 6831b94

Please sign in to comment.