1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2ef740c37SChristoph Hellwig #ifndef _RAID0_H 3ef740c37SChristoph Hellwig #define _RAID0_H 4ef740c37SChristoph Hellwig 5e373ab10SNeilBrown struct strip_zone { 6dc582663SAndre Noll sector_t zone_end; /* Start of the next zone (in sectors) */ 7ef740c37SChristoph Hellwig sector_t dev_start; /* Zone offset in real dev (in sectors) */ 8ef740c37SChristoph Hellwig int nb_dev; /* # of devices attached to the zone */ 9ef740c37SChristoph Hellwig }; 10ef740c37SChristoph Hellwig 11*c84a1372SNeilBrown /* Linux 3.14 (20d0189b101) made an unintended change to 12*c84a1372SNeilBrown * the RAID0 layout for multi-zone arrays (where devices aren't all 13*c84a1372SNeilBrown * the same size. 14*c84a1372SNeilBrown * RAID0_ORIG_LAYOUT restores the original layout 15*c84a1372SNeilBrown * RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout 16*c84a1372SNeilBrown * The layouts are identical when there is only one zone (all 17*c84a1372SNeilBrown * devices the same size). 18*c84a1372SNeilBrown */ 19*c84a1372SNeilBrown 20*c84a1372SNeilBrown enum r0layout { 21*c84a1372SNeilBrown RAID0_ORIG_LAYOUT = 1, 22*c84a1372SNeilBrown RAID0_ALT_MULTIZONE_LAYOUT = 2, 23*c84a1372SNeilBrown }; 24e373ab10SNeilBrown struct r0conf { 25ef740c37SChristoph Hellwig struct strip_zone *strip_zone; 26ba13da47SNeilBrown struct md_rdev **devlist; /* lists of rdevs, pointed to 27ba13da47SNeilBrown * by strip_zone->dev */ 28ef740c37SChristoph Hellwig int nr_strip_zones; 29*c84a1372SNeilBrown enum r0layout layout; 30ef740c37SChristoph Hellwig }; 31ef740c37SChristoph Hellwig 32ef740c37SChristoph Hellwig #endif 33