aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-08-29 22:09:26 -0400
committerDan Williams <dan.j.williams@intel.com>2009-08-29 22:09:26 -0400
commitad283ea4a3ce82cda2efe33163748a397b31b1eb (patch)
tree11cd739195f336895abe9e4a62d824e49a41c24f /drivers/md
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 <maan@systemlinux.org> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid5.c2
-rw-r--r--drivers/md/raid5.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 7727954cf726..1f2a266f3cf7 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2590,7 +2590,7 @@ static void handle_parity_checks5(raid5_conf_t *conf, struct stripe_head *sh,
2590 * we are done. Otherwise update the mismatch count and repair 2590 * we are done. Otherwise update the mismatch count and repair
2591 * parity if !MD_RECOVERY_CHECK 2591 * parity if !MD_RECOVERY_CHECK
2592 */ 2592 */
2593 if (sh->ops.zero_sum_result == 0) 2593 if ((sh->ops.zero_sum_result & SUM_CHECK_P_RESULT) == 0)
2594 /* parity is correct (on disc, 2594 /* parity is correct (on disc,
2595 * not in buffer any more) 2595 * not in buffer any more)
2596 */ 2596 */
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h
index e7baabffee86..75f2c6c4cf90 100644
--- a/drivers/md/raid5.h
+++ b/drivers/md/raid5.h
@@ -2,6 +2,7 @@
2#define _RAID5_H 2#define _RAID5_H
3 3
4#include <linux/raid/xor.h> 4#include <linux/raid/xor.h>
5#include <linux/dmaengine.h>
5 6
6/* 7/*
7 * 8 *
@@ -215,8 +216,8 @@ struct stripe_head {
215 * @target - STRIPE_OP_COMPUTE_BLK target 216 * @target - STRIPE_OP_COMPUTE_BLK target
216 */ 217 */
217 struct stripe_operations { 218 struct stripe_operations {
218 int target; 219 int target;
219 u32 zero_sum_result; 220 enum sum_check_flags zero_sum_result;
220 } ops; 221 } ops;
221 struct r5dev { 222 struct r5dev {
222 struct bio req; 223 struct bio req;