]> git.ipfire.org Git - thirdparty/mdadm.git/blame - mdmon.h
Store and recover spare_assign info in DDF.
[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;
c052ba30 14 int resync_start_fd;
549e9569
NB
15
16 enum array_state prev_state, curr_state, next_state;
17 enum sync_action prev_action, curr_action, next_action;
18
19 int devnum;
20
c052ba30 21 unsigned long long resync_start;
549e9569
NB
22};
23
24
25
26#define MD_MAJOR 9
27
28extern struct active_array *container;
549e9569
NB
29extern struct active_array *discard_this;
30extern struct active_array *pending_discard;
3e70c845 31extern struct md_generic_cmd *active_cmd;
549e9569
NB
32
33
e0d6609f 34void remove_pidfile(char *devname);
549e9569
NB
35void do_monitor(struct supertype *container);
36void do_manager(struct supertype *container);
37
38int read_dev_state(int fd);
39
40struct mdstat_ent *mdstat_read(int hold, int start);
41
42extern struct superswitch super_ddf, super_ddf_bvd, super_ddf_svd;
e0d6609f
NB
43
44extern int exit_now, manager_ready;