aboutsummaryrefslogtreecommitdiff
path: root/include/linux/raid
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-06-26 00:27:41 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 09:58:37 -0700
commitc93983bf517c100a31e40ef087e19bd3d7aa2d28 (patch)
tree9361c68d5f00ccd34cbc0a3bc7bc2389ce7f4c3a /include/linux/raid
parent7c7546ccf6463edbeee8d9aac6de7be1cd80d08a (diff)
[PATCH] md: support stripe/offset mode in raid10
The "industry standard" DDF format allows for a stripe/offset layout where data is duplicated on different stripes. e.g. A B C D D A B C E F G H H E F G (columns are drives, rows are stripes, LETTERS are chunks of data). This is similar to raid10's 'far' mode, but not quite the same. So enhance 'far' mode with a 'far/offset' option which follows the layout of DDFs stripe/offset. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid')
-rw-r--r--include/linux/raid/raid10.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/raid/raid10.h b/include/linux/raid/raid10.h
index b1103298a8c..c41e56a7c09 100644
--- a/include/linux/raid/raid10.h
+++ b/include/linux/raid/raid10.h
@@ -24,11 +24,16 @@ struct r10_private_data_s {
int far_copies; /* number of copies layed out
* at large strides across drives
*/
+ int far_offset; /* far_copies are offset by 1 stripe
+ * instead of many
+ */
int copies; /* near_copies * far_copies.
* must be <= raid_disks
*/
sector_t stride; /* distance between far copies.
- * This is size / far_copies
+ * This is size / far_copies unless
+ * far_offset, in which case it is
+ * 1 stripe.
*/
int chunk_shift; /* shift from chunks to sectors */