brintos

brintos / linux-shallow public Read only

0
0
Text · 951 B · 8cc761c Raw
34 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2#ifndef _RAID0_H3#define _RAID0_H4 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	int	 disk_shift;	/* start disk for the original layout */10};11 12/* Linux 3.14 (20d0189b101) made an unintended change to13 * the RAID0 layout for multi-zone arrays (where devices aren't all14 * the same size.15 * RAID0_ORIG_LAYOUT restores the original layout16 * RAID0_ALT_MULTIZONE_LAYOUT uses the altered layout17 * The layouts are identical when there is only one zone (all18 * devices the same size).19 */20 21enum r0layout {22	RAID0_ORIG_LAYOUT = 1,23	RAID0_ALT_MULTIZONE_LAYOUT = 2,24};25struct r0conf {26	struct strip_zone	*strip_zone;27	struct md_rdev		**devlist; /* lists of rdevs, pointed to28					    * by strip_zone->dev */29	int			nr_strip_zones;30	enum r0layout		layout;31};32 33#endif34