blob: 3816e5477db1e743afeaf707c1971f1dbdce1901 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _RAID0_H
3#define _RAID0_H
4
5struct strip_zone {
6 sector_t zone_end; /* Start of the next zone (in sectors) */
7 sector_t dev_start; /* Zone offset in real dev (in sectors) */
8 int nb_dev; /* # of devices attached to the zone */
9};
10
David Brazdil0f672f62019-12-10 10:32:29 +000011/* Linux 3.14 (20d0189b101) made an unintended change to
12 * the RAID0 layout for multi-zone arrays (where devices aren't all
13 * the same size.
14 * RAID0_ORIG_LAYOUT restores the original layout
15 * RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout
16 * The layouts are identical when there is only one zone (all
17 * devices the same size).
18 */
19
20enum r0layout {
21 RAID0_ORIG_LAYOUT = 1,
22 RAID0_ALT_MULTIZONE_LAYOUT = 2,
23};
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000024struct r0conf {
25 struct strip_zone *strip_zone;
26 struct md_rdev **devlist; /* lists of rdevs, pointed to
27 * by strip_zone->dev */
28 int nr_strip_zones;
David Brazdil0f672f62019-12-10 10:32:29 +000029 enum r0layout layout;
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000030};
31
32#endif