diff options
author | Dan Williams <dan.j.williams@intel.com> | 2007-07-09 11:56:42 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2007-07-13 08:06:14 -0700 |
commit | 685784aaf3cd0e3ff5e36c7ecf6f441cdbf57f73 (patch) | |
tree | 10f99829f7d877b87614fe69be77e363c026a8d7 /drivers/md/raid5.c | |
parent | d379b01e9087a582d58f4b678208a4f8d8376fe7 (diff) |
xor: make 'xor_blocks' a library routine for use with async_tx
The async_tx api tries to use a dma engine for an operation, but will fall
back to an optimized software routine otherwise. Xor support is
implemented using the raid5 xor routines. For organizational purposes this
routine is moved to a common area.
The following fixes are also made:
* rename xor_block => xor_blocks, suggested by Adrian Bunk
* ensure that xor.o initializes before md.o in the built-in case
* checkpatch.pl fixes
* mark calibrate_xor_blocks __init, Adrian Bunk
Cc: Adrian Bunk <bunk@stusta.de>
Cc: NeilBrown <neilb@suse.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 061375ee6592..5adbe0b22684 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -918,7 +918,7 @@ static void copy_data(int frombio, struct bio *bio, #define check_xor() do { \ if (count == MAX_XOR_BLOCKS) { \ - xor_block(count, STRIPE_SIZE, ptr); \ + xor_blocks(count, STRIPE_SIZE, ptr); \ count = 1; \ } \ } while(0) @@ -949,7 +949,7 @@ static void compute_block(struct stripe_head *sh, int dd_idx) check_xor(); } if (count != 1) - xor_block(count, STRIPE_SIZE, ptr); + xor_blocks(count, STRIPE_SIZE, ptr); set_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); } @@ -1004,7 +1004,7 @@ static void compute_parity5(struct stripe_head *sh, int method) break; } if (count>1) { - xor_block(count, STRIPE_SIZE, ptr); + xor_blocks(count, STRIPE_SIZE, ptr); count = 1; } @@ -1038,7 +1038,7 @@ static void compute_parity5(struct stripe_head *sh, int method) } } if (count != 1) - xor_block(count, STRIPE_SIZE, ptr); + xor_blocks(count, STRIPE_SIZE, ptr); if (method != CHECK_PARITY) { set_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); @@ -1160,7 +1160,7 @@ static void compute_block_1(struct stripe_head *sh, int dd_idx, int nozero) check_xor(); } if (count != 1) - xor_block(count, STRIPE_SIZE, ptr); + xor_blocks(count, STRIPE_SIZE, ptr); if (!nozero) set_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); else clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); } |