• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_MD_U_H
7 #define _UAPI_MD_U_H
8 #define MD_MAJOR_VERSION                0
9 #define MD_MINOR_VERSION                90
10 #define MD_PATCHLEVEL_VERSION           3
11 #define RAID_VERSION		_IOR (MD_MAJOR, 0x10, mdu_version_t)
12 #define GET_ARRAY_INFO		_IOR (MD_MAJOR, 0x11, mdu_array_info_t)
13 #define GET_DISK_INFO		_IOR (MD_MAJOR, 0x12, mdu_disk_info_t)
14 #define RAID_AUTORUN		_IO (MD_MAJOR, 0x14)
15 #define GET_BITMAP_FILE		_IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t)
16 #define CLEAR_ARRAY		_IO (MD_MAJOR, 0x20)
17 #define ADD_NEW_DISK		_IOW (MD_MAJOR, 0x21, mdu_disk_info_t)
18 #define HOT_REMOVE_DISK		_IO (MD_MAJOR, 0x22)
19 #define SET_ARRAY_INFO		_IOW (MD_MAJOR, 0x23, mdu_array_info_t)
20 #define SET_DISK_INFO		_IO (MD_MAJOR, 0x24)
21 #define WRITE_RAID_INFO		_IO (MD_MAJOR, 0x25)
22 #define UNPROTECT_ARRAY		_IO (MD_MAJOR, 0x26)
23 #define PROTECT_ARRAY		_IO (MD_MAJOR, 0x27)
24 #define HOT_ADD_DISK		_IO (MD_MAJOR, 0x28)
25 #define SET_DISK_FAULTY		_IO (MD_MAJOR, 0x29)
26 #define HOT_GENERATE_ERROR	_IO (MD_MAJOR, 0x2a)
27 #define SET_BITMAP_FILE		_IOW (MD_MAJOR, 0x2b, int)
28 #define RUN_ARRAY		_IOW (MD_MAJOR, 0x30, mdu_param_t)
29 #define STOP_ARRAY		_IO (MD_MAJOR, 0x32)
30 #define STOP_ARRAY_RO		_IO (MD_MAJOR, 0x33)
31 #define RESTART_ARRAY_RW	_IO (MD_MAJOR, 0x34)
32 #define CLUSTERED_DISK_NACK	_IO (MD_MAJOR, 0x35)
33 #define MdpMinorShift 6
34 typedef struct mdu_version_s {
35 	int major;
36 	int minor;
37 	int patchlevel;
38 } mdu_version_t;
39 typedef struct mdu_array_info_s {
40 
41 	int major_version;
42 	int minor_version;
43 	int patch_version;
44 	unsigned int ctime;
45 	int level;
46 	int size;
47 	int nr_disks;
48 	int raid_disks;
49 	int md_minor;
50 	int not_persistent;
51 
52 	unsigned int utime;
53 	int state;
54 	int active_disks;
55 	int working_disks;
56 	int failed_disks;
57 	int spare_disks;
58 
59 	int layout;
60 	int chunk_size;
61 } mdu_array_info_t;
62 #define	LEVEL_MULTIPATH		(-4)
63 #define	LEVEL_LINEAR		(-1)
64 #define	LEVEL_FAULTY		(-5)
65 #define	LEVEL_NONE		(-1000000)
66 typedef struct mdu_disk_info_s {
67 
68 	int number;
69 	int major;
70 	int minor;
71 	int raid_disk;
72 	int state;
73 } mdu_disk_info_t;
74 typedef struct mdu_start_info_s {
75 
76 	int major;
77 	int minor;
78 	int raid_disk;
79 	int state;
80 } mdu_start_info_t;
81 typedef struct mdu_bitmap_file_s
82 {
83 	char pathname[4096];
84 } mdu_bitmap_file_t;
85 typedef struct mdu_param_s
86 {
87 	int			personality;
88 	int			chunk_size;
89 	int			max_fault;
90 } mdu_param_t;
91 #endif
92