Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190580
b: refs/heads/master
c: 5157b4a
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams authored and Linus Torvalds committed May 5, 2010
1 parent 6ed4a80 commit 07b900c
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 7ebd467551ed6ae200d7835a84bbda0dcadaa511
refs/heads/master: 5157b4aa5b7de8787b6318e61bcc285031bb9088
21 changes: 13 additions & 8 deletions trunk/crypto/async_tx/async_raid6_recov.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ struct dma_async_tx_descriptor *
async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
struct page **blocks, struct async_submit_ctl *submit)
{
void *scribble = submit->scribble;
int non_zero_srcs, i;

BUG_ON(faila == failb);
Expand All @@ -332,11 +333,13 @@ async_raid6_2data_recov(int disks, size_t bytes, int faila, int failb,

pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes);

/* we need to preserve the contents of 'blocks' for the async
* case, so punt to synchronous if a scribble buffer is not available
/* if a dma resource is not available or a scribble buffer is not
* available punt to the synchronous path. In the 'dma not
* available' case be sure to use the scribble buffer to
* preserve the content of 'blocks' as the caller intended.
*/
if (!submit->scribble) {
void **ptrs = (void **) blocks;
if (!async_dma_find_channel(DMA_PQ) || !scribble) {
void **ptrs = scribble ? scribble : (void **) blocks;

async_tx_quiesce(&submit->depend_tx);
for (i = 0; i < disks; i++)
Expand Down Expand Up @@ -406,11 +409,13 @@ async_raid6_datap_recov(int disks, size_t bytes, int faila,

pr_debug("%s: disks: %d len: %zu\n", __func__, disks, bytes);

/* we need to preserve the contents of 'blocks' for the async
* case, so punt to synchronous if a scribble buffer is not available
/* if a dma resource is not available or a scribble buffer is not
* available punt to the synchronous path. In the 'dma not
* available' case be sure to use the scribble buffer to
* preserve the content of 'blocks' as the caller intended.
*/
if (!scribble) {
void **ptrs = (void **) blocks;
if (!async_dma_find_channel(DMA_PQ) || !scribble) {
void **ptrs = scribble ? scribble : (void **) blocks;

async_tx_quiesce(&submit->depend_tx);
for (i = 0; i < disks; i++)
Expand Down

0 comments on commit 07b900c

Please sign in to comment.