summaryrefslogtreecommitdiffstats
path: root/super-intel.c
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 /super-intel.c
parent071cfc42580673b149140339a862f90399dc00b5 (diff)
downloadmdadm-b7941fd68de046be58de4d53fe08925fdb9008f0.tar.gz
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 'super-intel.c')
-rw-r--r--super-intel.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/super-intel.c b/super-intel.c
index ab8172d..4072fc8 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -4108,12 +4108,12 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
}
if (consistent == 2 &&
- (!is_resync_complete(a) ||
+ (!is_resync_complete(&a->info) ||
map_state != IMSM_T_STATE_NORMAL ||
dev->vol.migr_state))
consistent = 0;
- if (is_resync_complete(a)) {
+ if (is_resync_complete(&a->info)) {
/* complete intialization / resync,
* recovery and interrupted recovery is completed in
* ->set_disk
@@ -4125,7 +4125,7 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
}
} else if (!is_resyncing(dev) && !failed) {
/* mark the start of the init process if nothing is failed */
- dprintf("imsm: mark resync start (%llu)\n", a->resync_start);
+ dprintf("imsm: mark resync start\n");
if (map->map_state == IMSM_T_STATE_UNINITIALIZED)
migrate(dev, IMSM_T_STATE_NORMAL, MIGR_INIT);
else
@@ -4137,8 +4137,7 @@ static int imsm_set_array_state(struct active_array *a, int consistent)
/* mark dirty / clean */
if (dev->vol.dirty != !consistent) {
- dprintf("imsm: mark '%s' (%llu)\n",
- consistent ? "clean" : "dirty", a->resync_start);
+ dprintf("imsm: mark '%s'\n", consistent ? "clean" : "dirty");
if (consistent)
dev->vol.dirty = 0;
else