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 */ 9*e8360070SJason Baron int disk_shift; /* start disk for the original layout */ 10ef740c37SChristoph Hellwig }; 11ef740c37SChristoph Hellwig 12c84a1372SNeilBrown /* Linux 3.14 (20d0189b101) made an unintended change to 13c84a1372SNeilBrown * the RAID0 layout for multi-zone arrays (where devices aren't all 14c84a1372SNeilBrown * the same size. 15c84a1372SNeilBrown * RAID0_ORIG_LAYOUT restores the original layout 16c84a1372SNeilBrown * RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout 17c84a1372SNeilBrown * The layouts are identical when there is only one zone (all 18c84a1372SNeilBrown * devices the same size). 19c84a1372SNeilBrown */ 20c84a1372SNeilBrown 21c84a1372SNeilBrown enum r0layout { 22c84a1372SNeilBrown RAID0_ORIG_LAYOUT = 1, 23c84a1372SNeilBrown RAID0_ALT_MULTIZONE_LAYOUT = 2, 24c84a1372SNeilBrown }; 25e373ab10SNeilBrown struct r0conf { 26ef740c37SChristoph Hellwig struct strip_zone *strip_zone; 27ba13da47SNeilBrown struct md_rdev **devlist; /* lists of rdevs, pointed to 28ba13da47SNeilBrown * by strip_zone->dev */ 29ef740c37SChristoph Hellwig int nr_strip_zones; 30c84a1372SNeilBrown enum r0layout layout; 31ef740c37SChristoph Hellwig }; 32ef740c37SChristoph Hellwig 33ef740c37SChristoph Hellwig #endif 34