X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=mdmon.h;h=41222e1c5a0aa60e502ebf65c8afc9819c899e8a;hb=593add1b56877a6881419c2496eb26dd1f82d39b;hp=62f34f7eae2b9706e20ddbcdd5aefaaea626871a;hpb=14e8215b1b996813e467ae6fba71b0e4f5690103;p=thirdparty%2Fmdadm.git diff --git a/mdmon.h b/mdmon.h index 62f34f7e..41222e1c 100644 --- 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; +} +