aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 20:08:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 20:08:40 -0400
commitc80ddb526331a72c9e9d1480f85f6fd7c74e3d2d (patch)
tree0212803a009f171990032abb94fad84156baa153 /include/linux
parent2c13bc0f8f0d3e13b42be70bf74fec8e56b58324 (diff)
parent1dff2b87a34a1ac1d1898ea109bf97ed396aca53 (diff)
Merge tag 'md-3.5' of git://neil.brown.name/md
Pull md updates from NeilBrown: "It's been a busy cycle for md - lots of fun stuff here.. if you like this kind of thing :-) Main features: - RAID10 arrays can be reshaped - adding and removing devices and changing chunks (not 'far' array though) - allow RAID5 arrays to be reshaped with a backup file (not tested yet, but the priciple works fine for RAID10). - arrays can be reshaped while a bitmap is present - you no longer need to remove it first - SSSE3 support for RAID6 syndrome calculations and of course a number of minor fixes etc." * tag 'md-3.5' of git://neil.brown.name/md: (56 commits) md/bitmap: record the space available for the bitmap in the superblock. md/raid10: Remove extras after reshape to smaller number of devices. md/raid5: improve removal of extra devices after reshape. md: check the return of mddev_find() MD RAID1: Further conditionalize 'fullsync' DM RAID: Use md_error() in place of simply setting Faulty bit DM RAID: Record and handle missing devices DM RAID: Set recovery flags on resume md/raid5: Allow reshape while a bitmap is present. md/raid10: resize bitmap when required during reshape. md: allow array to be resized while bitmap is present. md/bitmap: make sure reshape request are reflected in superblock. md/bitmap: add bitmap_resize function to allow bitmap resizing. md/bitmap: use DIV_ROUND_UP instead of open-code md/bitmap: create a 'struct bitmap_counts' substructure of 'struct bitmap' md/bitmap: make bitmap bitops atomic. md/bitmap: make _page_attr bitops atomic. md/bitmap: merge bitmap_file_unmap and bitmap_file_put. md/bitmap: remove async freeing of bitmap file. md/bitmap: convert some spin_lock_irqsave to spin_lock_irq ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/raid/md_p.h15
-rw-r--r--include/linux/raid/pq.h18
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;
99extern const struct raid6_calls raid6_altivec4; 99extern const struct raid6_calls raid6_altivec4;
100extern const struct raid6_calls raid6_altivec8; 100extern const struct raid6_calls raid6_altivec8;
101 101
102struct 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
110extern const struct raid6_recov_calls raid6_recov_intx1;
111extern const struct raid6_recov_calls raid6_recov_ssse3;
112
102/* Algorithm list */ 113/* Algorithm list */
103extern const struct raid6_calls * const raid6_algos[]; 114extern const struct raid6_calls * const raid6_algos[];
115extern const struct raid6_recov_calls *const raid6_recov_algos[];
104int raid6_select_algo(void); 116int 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 */
113extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256))); 125extern const u8 raid6_gfmul[256][256] __attribute__((aligned(256)));
126extern const u8 raid6_vgfmul[256][32] __attribute__((aligned(256)));
114extern const u8 raid6_gfexp[256] __attribute__((aligned(256))); 127extern const u8 raid6_gfexp[256] __attribute__((aligned(256)));
115extern const u8 raid6_gfinv[256] __attribute__((aligned(256))); 128extern const u8 raid6_gfinv[256] __attribute__((aligned(256)));
116extern const u8 raid6_gfexi[256] __attribute__((aligned(256))); 129extern const u8 raid6_gfexi[256] __attribute__((aligned(256)));
117 130
118/* Recovery routines */ 131/* Recovery routines */
119void raid6_2data_recov(int disks, size_t bytes, int faila, int failb, 132extern void (*raid6_2data_recov)(int disks, size_t bytes, int faila, int failb,
120 void **ptrs); 133 void **ptrs);
121void raid6_datap_recov(int disks, size_t bytes, int faila, void **ptrs); 134extern void (*raid6_datap_recov)(int disks, size_t bytes, int faila,
135 void **ptrs);
122void raid6_dual_recov(int disks, size_t bytes, int faila, int failb, 136void raid6_dual_recov(int disks, size_t bytes, int faila, int failb,
123 void **ptrs); 137 void **ptrs);
124 138