Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65125
b: refs/heads/master
c: e4d8490
h: refs/heads/master
i:
  65123: 9c17801
v: v3
  • Loading branch information
Dan Williams committed Sep 24, 2007
1 parent f284f54 commit 2f98f3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 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: 6247cdc2cd334dad0ea5428245a7d8f4b075f21e
refs/heads/master: e4d84909dd48b5e5806a5d18b881e1ca1610ba9b
17 changes: 7 additions & 10 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,24 +514,22 @@ static void ops_complete_biofill(void *stripe_head_ref)
struct stripe_head *sh = stripe_head_ref;
struct bio *return_bi = NULL;
raid5_conf_t *conf = sh->raid_conf;
int i, more_to_read = 0;
int i;

pr_debug("%s: stripe %llu\n", __FUNCTION__,
(unsigned long long)sh->sector);

/* clear completed biofills */
for (i = sh->disks; i--; ) {
struct r5dev *dev = &sh->dev[i];
/* check if this stripe has new incoming reads */
if (dev->toread)
more_to_read++;

/* acknowledge completion of a biofill operation */
/* and check if we need to reply to a read request
*/
if (test_bit(R5_Wantfill, &dev->flags) && !dev->toread) {
/* and check if we need to reply to a read request,
* new R5_Wantfill requests are held off until
* !test_bit(STRIPE_OP_BIOFILL, &sh->ops.pending)
*/
if (test_and_clear_bit(R5_Wantfill, &dev->flags)) {
struct bio *rbi, *rbi2;
clear_bit(R5_Wantfill, &dev->flags);

/* The access to dev->read is outside of the
* spin_lock_irq(&conf->device_lock), but is protected
Expand All @@ -558,8 +556,7 @@ static void ops_complete_biofill(void *stripe_head_ref)

return_io(return_bi);

if (more_to_read)
set_bit(STRIPE_HANDLE, &sh->state);
set_bit(STRIPE_HANDLE, &sh->state);
release_stripe(sh);
}

Expand Down

0 comments on commit 2f98f3e

Please sign in to comment.