blob: 3671187aca532ea5805eda9b6489beb0f82a178b [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _MD_U_H
13#define _MD_U_H
Ben Cheng4b29af02012-03-07 16:14:53 -080014
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080015#define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t)
16#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t)
17#define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t)
18#define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13)
19#define RAID_AUTORUN _IO (MD_MAJOR, 0x14)
20#define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t)
Ben Cheng4b29af02012-03-07 16:14:53 -080021
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080022#define CLEAR_ARRAY _IO (MD_MAJOR, 0x20)
23#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, mdu_disk_info_t)
24#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
25#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, mdu_array_info_t)
26#define SET_DISK_INFO _IO (MD_MAJOR, 0x24)
27#define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25)
28#define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26)
29#define PROTECT_ARRAY _IO (MD_MAJOR, 0x27)
30#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
31#define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29)
32#define HOT_GENERATE_ERROR _IO (MD_MAJOR, 0x2a)
33#define SET_BITMAP_FILE _IOW (MD_MAJOR, 0x2b, int)
Ben Cheng4b29af02012-03-07 16:14:53 -080034
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080035#define RUN_ARRAY _IOW (MD_MAJOR, 0x30, mdu_param_t)
36#define START_ARRAY _IO (MD_MAJOR, 0x31)
37#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
38#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
39#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
Ben Cheng4b29af02012-03-07 16:14:53 -080040
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080041typedef struct mdu_version_s {
42 int major;
43 int minor;
44 int patchlevel;
45} mdu_version_t;
Ben Cheng4b29af02012-03-07 16:14:53 -080046
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080047typedef struct mdu_array_info_s {
Ben Cheng4b29af02012-03-07 16:14:53 -080048
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049 int major_version;
50 int minor_version;
51 int patch_version;
52 int ctime;
53 int level;
54 int size;
55 int nr_disks;
56 int raid_disks;
57 int md_minor;
58 int not_persistent;
Ben Cheng4b29af02012-03-07 16:14:53 -080059
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080060 int utime;
61 int state;
62 int active_disks;
63 int working_disks;
64 int failed_disks;
65 int spare_disks;
Ben Cheng4b29af02012-03-07 16:14:53 -080066
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080067 int layout;
68 int chunk_size;
Ben Cheng4b29af02012-03-07 16:14:53 -080069
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080070} mdu_array_info_t;
Ben Cheng4b29af02012-03-07 16:14:53 -080071
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080072typedef struct mdu_disk_info_s {
Ben Cheng4b29af02012-03-07 16:14:53 -080073
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080074 int number;
75 int major;
76 int minor;
77 int raid_disk;
78 int state;
Ben Cheng4b29af02012-03-07 16:14:53 -080079
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080080} mdu_disk_info_t;
Ben Cheng4b29af02012-03-07 16:14:53 -080081
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080082typedef struct mdu_start_info_s {
Ben Cheng4b29af02012-03-07 16:14:53 -080083
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080084 int major;
85 int minor;
86 int raid_disk;
87 int state;
Ben Cheng4b29af02012-03-07 16:14:53 -080088
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080089} mdu_start_info_t;
Ben Cheng4b29af02012-03-07 16:14:53 -080090
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080091typedef struct mdu_bitmap_file_s
92{
93 char pathname[4096];
94} mdu_bitmap_file_t;
Ben Cheng4b29af02012-03-07 16:14:53 -080095
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080096typedef struct mdu_param_s
97{
98 int personality;
99 int chunk_size;
100 int max_fault;
101} mdu_param_t;
Ben Cheng4b29af02012-03-07 16:14:53 -0800102
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800103#endif
Ben Cheng4b29af02012-03-07 16:14:53 -0800104