aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid6recov.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-03-31 00:09:39 -0400
committerNeilBrown <neilb@suse.de>2009-03-31 00:09:39 -0400
commitf701d589aa34d7531183c9ac6f7713ba14212b02 (patch)
treed388cd7fa54c520f12233470a35ebb0676677e7a /drivers/md/raid6recov.c
parent18b0033491f584a2d79697da714b1ef9d6b27d22 (diff)
md/raid6: move raid6 data processing to raid6_pq.ko
Move the raid6 data processing routines into a standalone module (raid6_pq) to prepare them to be called from async_tx wrappers and other non-md drivers/modules. This precludes a circular dependency of raid456 needing the async modules for data processing while those modules in turn depend on raid456 for the base level synchronous raid6 routines. To support this move: 1/ The exportable definitions in raid6.h move to include/linux/raid/pq.h 2/ The raid6_call, recovery calls, and table symbols are exported 3/ Extra #ifdef __KERNEL__ statements to enable the userspace raid6test to compile Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid6recov.c')
-rw-r--r--drivers/md/raid6recov.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/md/raid6recov.c b/drivers/md/raid6recov.c
index 7a98b8652582..2609f00e0d61 100644
--- a/drivers/md/raid6recov.c
+++ b/drivers/md/raid6recov.c
@@ -18,7 +18,7 @@
18 * the syndrome.) 18 * the syndrome.)
19 */ 19 */
20 20
21#include "raid6.h" 21#include <linux/raid/pq.h>
22 22
23/* Recover two failed data blocks. */ 23/* Recover two failed data blocks. */
24void raid6_2data_recov(int disks, size_t bytes, int faila, int failb, 24void raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
@@ -63,9 +63,7 @@ void raid6_2data_recov(int disks, size_t bytes, int faila, int failb,
63 p++; q++; 63 p++; q++;
64 } 64 }
65} 65}
66 66EXPORT_SYMBOL_GPL(raid6_2data_recov);
67
68
69 67
70/* Recover failure of one data block plus the P block */ 68/* Recover failure of one data block plus the P block */
71void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs) 69void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs)
@@ -97,9 +95,10 @@ void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs)
97 q++; dq++; 95 q++; dq++;
98 } 96 }
99} 97}
98EXPORT_SYMBOL_GPL(raid6_datap_recov);
100 99
101 100#ifndef __KERNEL__
102#ifndef __KERNEL__ /* Testing only */ 101/* Testing only */
103 102
104/* Recover two failed blocks. */ 103/* Recover two failed blocks. */
105void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, void **ptrs) 104void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, void **ptrs)