diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-12-14 20:57:55 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-12-14 20:57:55 +0100 |
commit | b7941fd68de046be58de4d53fe08925fdb9008f0 (patch) | |
tree | d2ec919476da339a8e934192135b90f06f927eb5 /mdmon.h | |
parent | mdmon: cleanup manage_member() leak (diff) | |
download | mdadm-b7941fd68de046be58de4d53fe08925fdb9008f0.tar.xz mdadm-b7941fd68de046be58de4d53fe08925fdb9008f0.zip |
mdmon: cleanup resync_start
We don't need to sprinkle reads of this attribute all over the place,
just once at the entry of read_and_act(). Also, the mdinfo structure
for the array already has a 'resync_start' member, so just reuse that.
Finally, rename get_resync_start() to read_resync_start to make it
consistent with the other sysfs accessors in monitor.c.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'mdmon.h')
-rw-r--r-- | mdmon.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -39,8 +39,6 @@ struct active_array { int check_degraded; /* flag set by mon, read by manage */ int devnum; - - unsigned long long resync_start; }; /* @@ -73,7 +71,6 @@ extern int socket_hup_requested; extern int sigterm; int read_dev_state(int fd); -int get_resync_start(struct active_array *a); int is_container_member(struct mdstat_ent *mdstat, char *container); struct mdstat_ent *mdstat_read(int hold, int start); @@ -85,9 +82,9 @@ 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) +static inline int is_resync_complete(struct mdinfo *array) { - if (a->resync_start >= a->info.component_size) + if (array->resync_start >= array->component_size) return 1; return 0; } |