Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64863
b: refs/heads/master
c: a2e0855
h: refs/heads/master
i:
  64861: 88b03dd
  64859: 7818b6b
  64855: cd0c61f
  64847: b32dbde
  64831: d4717b5
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Sep 12, 2007
1 parent 7aaa159 commit afbd37a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: b70ae1d9f69ba52767af89f90fd79587669bc7ff
refs/heads/master: a2e0855182e2be26b252745b2bb7558705cb0dd2
17 changes: 9 additions & 8 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
struct dma_async_tx_descriptor *tx = NULL;
clear_bit(STRIPE_EXPAND_SOURCE, &sh->state);
for (i = 0; i < sh->disks; i++)
if (i != sh->pd_idx && (r6s && i != r6s->qd_idx)) {
if (i != sh->pd_idx && (!r6s || i != r6s->qd_idx)) {
int dd_idx, pd_idx, j;
struct stripe_head *sh2;

Expand Down Expand Up @@ -2574,7 +2574,8 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags);
for (j = 0; j < conf->raid_disks; j++)
if (j != sh2->pd_idx &&
(r6s && j != r6s->qd_idx) &&
(!r6s || j != raid6_next_disk(sh2->pd_idx,
sh2->disks)) &&
!test_bit(R5_Expanded, &sh2->dev[j].flags))
break;
if (j == conf->raid_disks) {
Expand All @@ -2583,12 +2584,12 @@ static void handle_stripe_expansion(raid5_conf_t *conf, struct stripe_head *sh,
}
release_stripe(sh2);

/* done submitting copies, wait for them to complete */
if (i + 1 >= sh->disks) {
async_tx_ack(tx);
dma_wait_for_async_tx(tx);
}
}
/* done submitting copies, wait for them to complete */
if (tx) {
async_tx_ack(tx);
dma_wait_for_async_tx(tx);
}
}

/*
Expand Down Expand Up @@ -2855,7 +2856,7 @@ static void handle_stripe5(struct stripe_head *sh)
sh->disks = conf->raid_disks;
sh->pd_idx = stripe_to_pdidx(sh->sector, conf,
conf->raid_disks);
s.locked += handle_write_operations5(sh, 0, 1);
s.locked += handle_write_operations5(sh, 1, 1);
} else if (s.expanded &&
!test_bit(STRIPE_OP_POSTXOR, &sh->ops.pending)) {
clear_bit(STRIPE_EXPAND_READY, &sh->state);
Expand Down

0 comments on commit afbd37a

Please sign in to comment.