]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.h
monitor: protect against CONFIG_LBD=n
[thirdparty/mdadm.git] / mdmon.h
diff --git a/mdmon.h b/mdmon.h
index 62f34f7eae2b9706e20ddbcdd5aefaaea626871a..41222e1c5a0aa60e502ebf65c8afc9819c899e8a 100644 (file)
--- a/mdmon.h
+++ b/mdmon.h
@@ -59,3 +59,14 @@ struct mdstat_ent *mdstat_read(int hold, int start);
 extern int exit_now, manager_ready;
 extern int mon_tid, mgr_tid;
 extern int monitor_loop_cnt;
+
+/* helper routine to determine resync completion since MaxSector is a
+ * moving target
+ */
+static inline int is_resync_complete(struct active_array *a)
+{
+       if (a->resync_start >= a->info.component_size)
+               return 1;
+       return 0;
+}
+