]>
git.ipfire.org Git - thirdparty/mdadm.git/blob - mdmon.h
2 enum array_state
{ clear
, inactive
, suspended
, readonly
, read_auto
,
3 clean
, active
, write_pending
, active_idle
, bad_word
};
5 enum sync_action
{ idle
, reshape
, resync
, recover
, check
, repair
, bad_action
};
10 struct supertype
*container
;
11 struct active_array
*next
, *replaces
;
16 enum array_state prev_state
, curr_state
, next_state
;
17 enum sync_action prev_action
, curr_action
, next_action
;
19 int check_degraded
; /* flag set by mon, read by manage */
23 unsigned long long resync_start
;
27 * Metadata updates are handled by the monitor thread,
28 * as it has exclusive access to the metadata.
29 * When the manager want to updates metadata, either
30 * for it's own reason (e.g. committing a spare) or
31 * on behalf of mdadm, it creates a metadata_update
32 * structure and queues it to the monitor.
33 * Updates are created and processed by code under the
34 * superswitch. All common code sees them as opaque
37 struct metadata_update
{
40 void *space
; /* allocated space that monitor will use */
41 struct metadata_update
*next
;
43 extern struct metadata_update
*update_queue
, *update_queue_handled
;
47 extern struct active_array
*container
;
48 extern struct active_array
*discard_this
;
49 extern struct active_array
*pending_discard
;
50 extern struct md_generic_cmd
*active_cmd
;
53 void remove_pidfile(char *devname
);
54 void do_monitor(struct supertype
*container
);
55 void do_manager(struct supertype
*container
);
57 int read_dev_state(int fd
);
59 struct mdstat_ent
*mdstat_read(int hold
, int start
);
61 extern struct superswitch super_ddf
, super_ddf_bvd
, super_ddf_svd
;
63 extern int exit_now
, manager_ready
;