]> git.ipfire.org Git - thirdparty/mdadm.git/blame - mdmon.h
start fleshing out socket code, ping monitor to see if it is alive
[thirdparty/mdadm.git] / mdmon.h
CommitLineData
549e9569
NB
1
2enum array_state { clear, inactive, suspended, readonly, read_auto,
3 clean, active, write_pending, active_idle, bad_word};
4
5enum sync_action { idle, reshape, resync, recover, check, repair, bad_action };
6
7
8struct active_array {
9 struct mdinfo info;
10 struct supertype *container;
11 struct active_array *next, *replaces;
12
13 int action_fd;
14 int sync_pos_fd;
c052ba30 15 int resync_start_fd;
549e9569
NB
16
17 enum array_state prev_state, curr_state, next_state;
18 enum sync_action prev_action, curr_action, next_action;
19
20 int devnum;
21
22 unsigned long long sync_pos;
c052ba30 23 unsigned long long resync_start;
549e9569
NB
24};
25
26
27
28#define MD_MAJOR 9
29
30extern struct active_array *container;
31extern struct active_array *array_list;
32extern struct active_array *discard_this;
33extern struct active_array *pending_discard;
34
35
36void do_monitor(struct supertype *container);
37void do_manager(struct supertype *container);
38
39int read_dev_state(int fd);
40
41struct mdstat_ent *mdstat_read(int hold, int start);
42
43extern struct superswitch super_ddf, super_ddf_bvd, super_ddf_svd;