Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _RAID0_H
0003 #define _RAID0_H
0004 
0005 struct strip_zone {
0006     sector_t zone_end;  /* Start of the next zone (in sectors) */
0007     sector_t dev_start; /* Zone offset in real dev (in sectors) */
0008     int  nb_dev;    /* # of devices attached to the zone */
0009 };
0010 
0011 /* Linux 3.14 (20d0189b101) made an unintended change to
0012  * the RAID0 layout for multi-zone arrays (where devices aren't all
0013  * the same size.
0014  * RAID0_ORIG_LAYOUT restores the original layout
0015  * RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout
0016  * The layouts are identical when there is only one zone (all
0017  * devices the same size).
0018  */
0019 
0020 enum r0layout {
0021     RAID0_ORIG_LAYOUT = 1,
0022     RAID0_ALT_MULTIZONE_LAYOUT = 2,
0023 };
0024 struct r0conf {
0025     struct strip_zone   *strip_zone;
0026     struct md_rdev      **devlist; /* lists of rdevs, pointed to
0027                         * by strip_zone->dev */
0028     int         nr_strip_zones;
0029     enum r0layout       layout;
0030 };
0031 
0032 #endif