diff options
Diffstat (limited to 'drivers/md/raid6algos.c')
-rw-r--r-- | drivers/md/raid6algos.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/md/raid6algos.c b/drivers/md/raid6algos.c index 1f6a3c82ee0c..866215ac7f25 100644 --- a/drivers/md/raid6algos.c +++ b/drivers/md/raid6algos.c | |||
@@ -16,13 +16,20 @@ | |||
16 | * Algorithm list and algorithm selection for RAID-6 | 16 | * Algorithm list and algorithm selection for RAID-6 |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "raid6.h" | 19 | #include <linux/raid/pq.h> |
20 | #ifndef __KERNEL__ | 20 | #ifndef __KERNEL__ |
21 | #include <sys/mman.h> | 21 | #include <sys/mman.h> |
22 | #include <stdio.h> | 22 | #include <stdio.h> |
23 | #else | ||
24 | #if !RAID6_USE_EMPTY_ZERO_PAGE | ||
25 | /* In .bss so it's zeroed */ | ||
26 | const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); | ||
27 | EXPORT_SYMBOL(raid6_empty_zero_page); | ||
28 | #endif | ||
23 | #endif | 29 | #endif |
24 | 30 | ||
25 | struct raid6_calls raid6_call; | 31 | struct raid6_calls raid6_call; |
32 | EXPORT_SYMBOL_GPL(raid6_call); | ||
26 | 33 | ||
27 | /* Various routine sets */ | 34 | /* Various routine sets */ |
28 | extern const struct raid6_calls raid6_intx1; | 35 | extern const struct raid6_calls raid6_intx1; |
@@ -79,6 +86,7 @@ const struct raid6_calls * const raid6_algos[] = { | |||
79 | #else | 86 | #else |
80 | /* Need more time to be stable in userspace */ | 87 | /* Need more time to be stable in userspace */ |
81 | #define RAID6_TIME_JIFFIES_LG2 9 | 88 | #define RAID6_TIME_JIFFIES_LG2 9 |
89 | #define time_before(x, y) ((x) < (y)) | ||
82 | #endif | 90 | #endif |
83 | 91 | ||
84 | /* Try to pick the best algorithm */ | 92 | /* Try to pick the best algorithm */ |
@@ -152,3 +160,12 @@ int __init raid6_select_algo(void) | |||
152 | 160 | ||
153 | return best ? 0 : -EINVAL; | 161 | return best ? 0 : -EINVAL; |
154 | } | 162 | } |
163 | |||
164 | static void raid6_exit(void) | ||
165 | { | ||
166 | do { } while (0); | ||
167 | } | ||
168 | |||
169 | subsys_initcall(raid6_select_algo); | ||
170 | module_exit(raid6_exit); | ||
171 | MODULE_LICENSE("GPL"); | ||