Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_MD_U_H |
| 8 | #define _UAPI_MD_U_H |
| 9 | #define MD_MAJOR_VERSION 0 |
| 10 | #define MD_MINOR_VERSION 90 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define MD_PATCHLEVEL_VERSION 3 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | #define STOP_ARRAY_RO _IO(MD_MAJOR, 0x33) |
| 32 | #define RESTART_ARRAY_RW _IO(MD_MAJOR, 0x34) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 33 | #define CLUSTERED_DISK_NACK _IO(MD_MAJOR, 0x35) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #define MdpMinorShift 6 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 35 | typedef struct mdu_version_s { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | int major; |
| 37 | int minor; |
| 38 | int patchlevel; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 39 | } mdu_version_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | typedef struct mdu_array_info_s { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | int major_version; |
| 42 | int minor_version; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 | int patch_version; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 44 | unsigned int ctime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | int level; |
| 46 | int size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 47 | int nr_disks; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 48 | int raid_disks; |
| 49 | int md_minor; |
| 50 | int not_persistent; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 51 | unsigned int utime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 | int state; |
| 53 | int active_disks; |
| 54 | int working_disks; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 55 | int failed_disks; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | int spare_disks; |
| 57 | int layout; |
| 58 | int chunk_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 59 | } mdu_array_info_t; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 60 | #define LEVEL_NONE (- 1000000) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | typedef struct mdu_disk_info_s { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 62 | int number; |
| 63 | int major; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 64 | int minor; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | int raid_disk; |
| 66 | int state; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | } mdu_disk_info_t; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 68 | typedef struct mdu_start_info_s { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | int major; |
| 70 | int minor; |
| 71 | int raid_disk; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 72 | int state; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 73 | } mdu_start_info_t; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 74 | typedef struct mdu_bitmap_file_s { |
| 75 | char pathname[4096]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 76 | } mdu_bitmap_file_t; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 | typedef struct mdu_param_s { |
| 78 | int personality; |
| 79 | int chunk_size; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 80 | int max_fault; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | } mdu_param_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | #endif |