summaryrefslogtreecommitdiff
path: root/mdmon.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-12-14 12:57:55 -0700
committerDan Williams <dan.j.williams@intel.com>2009-12-14 12:57:55 -0700
commitb7941fd68de046be58de4d53fe08925fdb9008f0 (patch)
treed2ec919476da339a8e934192135b90f06f927eb5 /mdmon.h
parent071cfc42580673b149140339a862f90399dc00b5 (diff)
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.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/mdmon.h b/mdmon.h
index 7cfee353..44940853 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -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;
}