• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_MD_U_H
8 #define _UAPI_MD_U_H
9 #define MD_MAJOR_VERSION 0
10 #define MD_MINOR_VERSION 90
11 #define MD_PATCHLEVEL_VERSION 3
12 #define RAID_VERSION _IOR(MD_MAJOR, 0x10, mdu_version_t)
13 #define GET_ARRAY_INFO _IOR(MD_MAJOR, 0x11, mdu_array_info_t)
14 #define GET_DISK_INFO _IOR(MD_MAJOR, 0x12, mdu_disk_info_t)
15 #define RAID_AUTORUN _IO(MD_MAJOR, 0x14)
16 #define GET_BITMAP_FILE _IOR(MD_MAJOR, 0x15, mdu_bitmap_file_t)
17 #define CLEAR_ARRAY _IO(MD_MAJOR, 0x20)
18 #define ADD_NEW_DISK _IOW(MD_MAJOR, 0x21, mdu_disk_info_t)
19 #define HOT_REMOVE_DISK _IO(MD_MAJOR, 0x22)
20 #define SET_ARRAY_INFO _IOW(MD_MAJOR, 0x23, mdu_array_info_t)
21 #define SET_DISK_INFO _IO(MD_MAJOR, 0x24)
22 #define WRITE_RAID_INFO _IO(MD_MAJOR, 0x25)
23 #define UNPROTECT_ARRAY _IO(MD_MAJOR, 0x26)
24 #define PROTECT_ARRAY _IO(MD_MAJOR, 0x27)
25 #define HOT_ADD_DISK _IO(MD_MAJOR, 0x28)
26 #define SET_DISK_FAULTY _IO(MD_MAJOR, 0x29)
27 #define HOT_GENERATE_ERROR _IO(MD_MAJOR, 0x2a)
28 #define SET_BITMAP_FILE _IOW(MD_MAJOR, 0x2b, int)
29 #define RUN_ARRAY _IOW(MD_MAJOR, 0x30, mdu_param_t)
30 #define STOP_ARRAY _IO(MD_MAJOR, 0x32)
31 #define STOP_ARRAY_RO _IO(MD_MAJOR, 0x33)
32 #define RESTART_ARRAY_RW _IO(MD_MAJOR, 0x34)
33 #define CLUSTERED_DISK_NACK _IO(MD_MAJOR, 0x35)
34 #define MdpMinorShift 6
35 typedef struct mdu_version_s {
36   int major;
37   int minor;
38   int patchlevel;
39 } mdu_version_t;
40 typedef struct mdu_array_info_s {
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   unsigned int utime;
52   int state;
53   int active_disks;
54   int working_disks;
55   int failed_disks;
56   int spare_disks;
57   int layout;
58   int chunk_size;
59 } mdu_array_info_t;
60 #define LEVEL_NONE (- 1000000)
61 typedef struct mdu_disk_info_s {
62   int number;
63   int major;
64   int minor;
65   int raid_disk;
66   int state;
67 } mdu_disk_info_t;
68 typedef struct mdu_start_info_s {
69   int major;
70   int minor;
71   int raid_disk;
72   int state;
73 } mdu_start_info_t;
74 typedef struct mdu_bitmap_file_s {
75   char pathname[4096];
76 } mdu_bitmap_file_t;
77 typedef struct mdu_param_s {
78   int personality;
79   int chunk_size;
80   int max_fault;
81 } mdu_param_t;
82 #endif
83