Home | History | Annotate | Download | only in raid
      1 /****************************************************************************
      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
     14 
     15 #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)
     21 
     22 #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)
     34 
     35 #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)
     40 
     41 typedef struct mdu_version_s {
     42  int major;
     43  int minor;
     44  int patchlevel;
     45 } mdu_version_t;
     46 
     47 typedef struct mdu_array_info_s {
     48 
     49  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;
     59 
     60  int utime;
     61  int state;
     62  int active_disks;
     63  int working_disks;
     64  int failed_disks;
     65  int spare_disks;
     66 
     67  int layout;
     68  int chunk_size;
     69 
     70 } mdu_array_info_t;
     71 
     72 typedef struct mdu_disk_info_s {
     73 
     74  int number;
     75  int major;
     76  int minor;
     77  int raid_disk;
     78  int state;
     79 
     80 } mdu_disk_info_t;
     81 
     82 typedef struct mdu_start_info_s {
     83 
     84  int major;
     85  int minor;
     86  int raid_disk;
     87  int state;
     88 
     89 } mdu_start_info_t;
     90 
     91 typedef struct mdu_bitmap_file_s
     92 {
     93  char pathname[4096];
     94 } mdu_bitmap_file_t;
     95 
     96 typedef struct mdu_param_s
     97 {
     98  int personality;
     99  int chunk_size;
    100  int max_fault;
    101 } mdu_param_t;
    102 
    103 #endif
    104 
    105