]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.h
mdmon: ping will wait for manage_mon to catch up.
[thirdparty/mdadm.git] / mdmon.h
diff --git a/mdmon.h b/mdmon.h
index 965f6438aea6cc4c80a26d74abc38c1c19e4f3e7..6c1961ad50a7e2fa2c4dc7414163e5d2fce9caab 100644 (file)
--- a/mdmon.h
+++ b/mdmon.h
@@ -1,3 +1,10 @@
+#ifdef DEBUG
+#define dprintf(fmt, arg...) \
+       fprintf(stderr, fmt, ##arg)
+#else
+#define dprintf(fmt, arg...) \
+        ({ if (0) fprintf(stderr, fmt, ##arg); 0; })
+#endif
 
 enum array_state { clear, inactive, suspended, readonly, read_auto,
                   clean, active, write_pending, active_idle, bad_word};
@@ -16,6 +23,8 @@ struct active_array {
        enum array_state prev_state, curr_state, next_state;
        enum sync_action prev_action, curr_action, next_action;
 
+       int check_degraded; /* flag set by mon, read by manage */
+
        int devnum;
 
        unsigned long long resync_start;
@@ -32,12 +41,6 @@ struct active_array {
  * superswitch.  All common code sees them as opaque
  * blobs.
  */
-struct metadata_update {
-       int     len;
-       char    *buf;
-       void    *space; /* allocated space that monitor will use */
-       struct metadata_update *next;
-};
 extern struct metadata_update *update_queue, *update_queue_handled;
 
 #define MD_MAJOR 9
@@ -53,9 +56,10 @@ void do_monitor(struct supertype *container);
 void do_manager(struct supertype *container);
 
 int read_dev_state(int fd);
+int get_resync_start(struct active_array *a);
 
 struct mdstat_ent *mdstat_read(int hold, int start);
 
-extern struct superswitch super_ddf, super_ddf_bvd, super_ddf_svd;
-
 extern int exit_now, manager_ready;
+extern int mon_tid, mgr_tid;
+extern int monitor_loop_cnt;