diff options
Diffstat (limited to 'include/linux/raid')
| -rw-r--r-- | include/linux/raid/md_p.h | 15 | ||||
| -rw-r--r-- | include/linux/raid/pq.h | 18 |
2 files changed, 29 insertions, 4 deletions
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 8c0a3adc5df5..ee753536ab70 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
| @@ -233,7 +233,10 @@ struct mdp_superblock_1 { | |||
| 233 | __le32 delta_disks; /* change in number of raid_disks */ | 233 | __le32 delta_disks; /* change in number of raid_disks */ |
| 234 | __le32 new_layout; /* new layout */ | 234 | __le32 new_layout; /* new layout */ |
| 235 | __le32 new_chunk; /* new chunk size (512byte sectors) */ | 235 | __le32 new_chunk; /* new chunk size (512byte sectors) */ |
| 236 | __u8 pad1[128-124]; /* set to 0 when written */ | 236 | __le32 new_offset; /* signed number to add to data_offset in new |
| 237 | * layout. 0 == no-change. This can be | ||
| 238 | * different on each device in the array. | ||
| 239 | */ | ||
| 237 | 240 | ||
| 238 | /* constant this-device information - 64 bytes */ | 241 | /* constant this-device information - 64 bytes */ |
| 239 | __le64 data_offset; /* sector start of data, often 0 */ | 242 | __le64 data_offset; /* sector start of data, often 0 */ |
| @@ -281,10 +284,18 @@ struct mdp_superblock_1 { | |||
| 281 | * active device with same 'role'. | 284 | * active device with same 'role'. |
| 282 | * 'recovery_offset' is also set. | 285 | * 'recovery_offset' is also set. |
| 283 | */ | 286 | */ |
| 287 | #define MD_FEATURE_RESHAPE_BACKWARDS 32 /* Reshape doesn't change number | ||
| 288 | * of devices, but is going | ||
| 289 | * backwards anyway. | ||
| 290 | */ | ||
| 291 | #define MD_FEATURE_NEW_OFFSET 64 /* new_offset must be honoured */ | ||
| 284 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ | 292 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ |
| 285 | |MD_FEATURE_RECOVERY_OFFSET \ | 293 | |MD_FEATURE_RECOVERY_OFFSET \ |
| 286 | |MD_FEATURE_RESHAPE_ACTIVE \ | 294 | |MD_FEATURE_RESHAPE_ACTIVE \ |
| 287 | |MD_FEATURE_BAD_BLOCKS \ | 295 | |MD_FEATURE_BAD_BLOCKS \ |
| 288 | |MD_FEATURE_REPLACEMENT) | 296 | |MD_FEATURE_REPLACEMENT \ |
| 297 | |MD_FEATURE_RESHAPE_BACKWARDS \ | ||
| 298 | |MD_FEATURE_NEW_OFFSET \ | ||
| 299 | ) | ||
| 289 | 300 | ||
| 290 | #endif | 301 | #endif |
diff --git a/include/linux/raid/pq.h b/include/linux/raid/pq.h index 53272e9860a7..640c69ceec96 100644 --- a/include/linux/raid/pq.h +++ b/include/linux/raid/pq.h | |||
| @@ -99,8 +99,20 @@ extern const struct raid6_calls raid6_altivec2; | |||
| 99 | extern const struct raid6_calls raid6_altivec4; | 99 | extern const struct raid6_calls raid6_altivec4; |
| 100 | extern const struct raid6_calls raid6_altivec8; | 100 | extern const struct raid6_calls raid6_altivec8; |
| 101 | 101 | ||
| 102 | struct raid6_recov_calls { | ||
| 103 | void (*data2)(int, size_t, int, int, void **); | ||
| 104 | void (*datap)(int, size_t, int, void **); | ||
| 105 | int (*valid)(void); | ||
| 106 | const char *name; | ||
| 107 | int priority; | ||
| 108 | }; | ||
| 109 | |||
| 110 | extern const struct raid6_recov_calls raid6_recov_intx1; | ||
| 111 | extern const struct raid6_recov_calls raid6_recov_ssse3; | ||
| 112 | |||
| 102 | /* Algorithm list */ | 113 | /* Algorithm list */ |
| 103 | extern const struct raid6_calls * const raid6_algos[]; | 114 | extern const struct raid6_calls * const raid6_algos[]; |
| 115 | extern const struct raid6_recov_calls *const raid6_recov_algos[]; | ||
| 104 | int raid6_select_algo(void); | 116 | int raid6_select_algo(void); |
| 105 | 117 | ||
| 106 | /* Return values from chk_syndrome */ | 118 | /* Return values from chk_syndrome */ |
| @@ -111,14 +123,16 @@ int raid6_select_algo(void); | |||
| 111 | 123 | ||
| 112 | /* Galois field tables */ | 124 | /* Galois field tables */ |
| 113 | extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); | 125 | extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); |
| 126 | extern const u8 raid6_vgfmul[256][32] __attribute__((aligned(256))); | ||
| 114 | extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); | 127 | extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); |
| 115 | extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); | 128 | extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); |
| 116 | extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); | 129 | extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); |
| 117 | 130 | ||
| 118 | /* Recovery routines */ | 131 | /* Recovery routines */ |
| 119 | void raid6_2data_recov(int disks, size_t bytes, int faila, int failb, | 132 | extern void (*raid6_2data_recov)(int disks, size_t bytes, int faila, int failb, |
| 120 | void **ptrs); | 133 | void **ptrs); |
| 121 | void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs); | 134 | extern void (*raid6_datap_recov)(int disks, size_t bytes, int faila, |
| 135 | void **ptrs); | ||
| 122 | void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, | 136 | void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, |
| 123 | void **ptrs); | 137 | void **ptrs); |
| 124 | 138 | ||
