Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73695
b: refs/heads/master
c: 6c55be8
h: refs/heads/master
i:
  73693: eaed418
  73691: b8d2fc4
  73687: d68e689
  73679: b7277d6
  73663: 7a4170a
v: v3
  • Loading branch information
Dan Williams authored and Linus Torvalds committed Nov 15, 2007
1 parent 0ac022d commit 816f3df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 5b23dbe8173c212d6a326e35347b038705603d39
refs/heads/master: 6c55be8b962f1bdc592d579e81fc27b11ea53dfc
16 changes: 9 additions & 7 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,15 +688,16 @@ ops_run_prexor(struct stripe_head *sh, struct dma_async_tx_descriptor *tx)
}

static struct dma_async_tx_descriptor *
ops_run_biodrain(struct stripe_head *sh, struct dma_async_tx_descriptor *tx)
ops_run_biodrain(struct stripe_head *sh, struct dma_async_tx_descriptor *tx,
unsigned long pending)
{
int disks = sh->disks;
int pd_idx = sh->pd_idx, i;

/* check if prexor is active which means only process blocks
* that are part of a read-modify-write (Wantprexor)
*/
int prexor = test_bit(STRIPE_OP_PREXOR, &sh->ops.pending);
int prexor = test_bit(STRIPE_OP_PREXOR, &pending);

pr_debug("%s: stripe %llu\n", __FUNCTION__,
(unsigned long long)sh->sector);
Expand Down Expand Up @@ -773,15 +774,16 @@ static void ops_complete_write(void *stripe_head_ref)
}

static void
ops_run_postxor(struct stripe_head *sh, struct dma_async_tx_descriptor *tx)
ops_run_postxor(struct stripe_head *sh, struct dma_async_tx_descriptor *tx,
unsigned long pending)
{
/* kernel stack size limits the total number of disks */
int disks = sh->disks;
struct page *xor_srcs[disks];

int count = 0, pd_idx = sh->pd_idx, i;
struct page *xor_dest;
int prexor = test_bit(STRIPE_OP_PREXOR, &sh->ops.pending);
int prexor = test_bit(STRIPE_OP_PREXOR, &pending);
unsigned long flags;
dma_async_tx_callback callback;

Expand All @@ -808,7 +810,7 @@ ops_run_postxor(struct stripe_head *sh, struct dma_async_tx_descriptor *tx)
}

/* check whether this postxor is part of a write */
callback = test_bit(STRIPE_OP_BIODRAIN, &sh->ops.pending) ?
callback = test_bit(STRIPE_OP_BIODRAIN, &pending) ?
ops_complete_write : ops_complete_postxor;

/* 1/ if we prexor'd then the dest is reused as a source
Expand Down Expand Up @@ -896,12 +898,12 @@ static void raid5_run_ops(struct stripe_head *sh, unsigned long pending)
tx = ops_run_prexor(sh, tx);

if (test_bit(STRIPE_OP_BIODRAIN, &pending)) {
tx = ops_run_biodrain(sh, tx);
tx = ops_run_biodrain(sh, tx, pending);
overlap_clear++;
}

if (test_bit(STRIPE_OP_POSTXOR, &pending))
ops_run_postxor(sh, tx);
ops_run_postxor(sh, tx, pending);

if (test_bit(STRIPE_OP_CHECK, &pending))
ops_run_check(sh);
Expand Down

0 comments on commit 816f3df

Please sign in to comment.