path: root/crypto
diff options
authorDan Williams <>2009-08-29 19:09:26 -0700
committerDan Williams <>2009-08-29 19:09:26 -0700
commitad283ea4a3ce82cda2efe33163748a397b31b1eb (patch)
tree11cd739195f336895abe9e4a62d824e49a41c24f /crypto
parentd6f38f31f3ad4b0dd33fe970988f14e7c65ef702 (diff)
async_tx: add sum check flags
Replace the flat zero_sum_result with a collection of flags to contain the P (xor) zero-sum result, and the soon to be utilized Q (raid6 reed solomon syndrome) zero-sum result. Use the SUM_CHECK_ namespace instead of DMA_ since these flags will be used on non-dma-zero-sum enabled platforms. Reviewed-by: Andre Noll <> Acked-by: Maciej Sosnowski <> Signed-off-by: Dan Williams <>
Diffstat (limited to 'crypto')
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index 1e96c4df7061..78fb7780272a 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -246,7 +246,7 @@ static int page_is_zero(struct page *p, unsigned int offset, size_t len)
struct dma_async_tx_descriptor *
async_xor_val(struct page *dest, struct page **src_list, unsigned int offset,
- int src_cnt, size_t len, u32 *result,
+ int src_cnt, size_t len, enum sum_check_flags *result,
struct async_submit_ctl *submit)
struct dma_chan *chan = async_tx_find_channel(submit, DMA_XOR_VAL,
@@ -304,7 +304,7 @@ async_xor_val(struct page *dest, struct page **src_list, unsigned int offset,
- *result = page_is_zero(dest, offset, len) ? 0 : 1;
+ *result = !page_is_zero(dest, offset, len) << SUM_CHECK_P;
submit->flags = flags_orig;