2017-11-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-16 15:20:36 -07:00
|
|
|
#ifndef _RAID0_H
|
|
|
|
|
#define _RAID0_H
|
|
|
|
|
|
2011-10-11 16:48:59 +11:00
|
|
|
struct strip_zone {
|
2009-06-16 16:18:43 +10:00
|
|
|
sector_t zone_end; /* Start of the next zone (in sectors) */
|
2009-01-09 08:31:06 +11:00
|
|
|
sector_t dev_start; /* Zone offset in real dev (in sectors) */
|
2012-03-19 12:46:39 +11:00
|
|
|
int nb_dev; /* # of devices attached to the zone */
|
2005-04-16 15:20:36 -07:00
|
|
|
};
|
|
|
|
|
|
2019-09-09 16:30:02 +10:00
|
|
|
/* Linux 3.14 (20d0189b101) made an unintended change to
|
|
|
|
|
* the RAID0 layout for multi-zone arrays (where devices aren't all
|
|
|
|
|
* the same size.
|
|
|
|
|
* RAID0_ORIG_LAYOUT restores the original layout
|
|
|
|
|
* RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout
|
|
|
|
|
* The layouts are identical when there is only one zone (all
|
|
|
|
|
* devices the same size).
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
enum r0layout {
|
|
|
|
|
RAID0_ORIG_LAYOUT = 1,
|
|
|
|
|
RAID0_ALT_MULTIZONE_LAYOUT = 2,
|
|
|
|
|
};
|
2011-10-11 16:48:59 +11:00
|
|
|
struct r0conf {
|
2012-03-19 12:46:39 +11:00
|
|
|
struct strip_zone *strip_zone;
|
|
|
|
|
struct md_rdev **devlist; /* lists of rdevs, pointed to
|
|
|
|
|
* by strip_zone->dev */
|
|
|
|
|
int nr_strip_zones;
|
2019-09-09 16:30:02 +10:00
|
|
|
enum r0layout layout;
|
2005-04-16 15:20:36 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|