File: raid0.h

package info (click to toggle)
linux 6.12.43-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,676,260 kB
  • sloc: ansic: 25,921,022; asm: 269,579; sh: 136,424; python: 65,440; makefile: 55,721; perl: 37,752; xml: 19,284; cpp: 5,895; yacc: 4,927; lex: 2,939; awk: 1,594; sed: 28; ruby: 25
file content (33 lines) | stat: -rw-r--r-- 951 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _RAID0_H
#define _RAID0_H

struct strip_zone {
	sector_t zone_end;	/* Start of the next zone (in sectors) */
	sector_t dev_start;	/* Zone offset in real dev (in sectors) */
	int	 nb_dev;	/* # of devices attached to the zone */
	int	 disk_shift;	/* start disk for the original layout */
};

/* 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,
};
struct r0conf {
	struct strip_zone	*strip_zone;
	struct md_rdev		**devlist; /* lists of rdevs, pointed to
					    * by strip_zone->dev */
	int			nr_strip_zones;
	enum r0layout		layout;
};

#endif