diff options
author | Dan Williams <dan.j.williams@intel.com> | 2010-05-15 02:42:49 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-05-15 02:42:49 +0200 |
commit | 484240d8a3facde992009efd81bfa4cc0c79287d (patch) | |
tree | e8caef63af97a57817ab331256528f0836737ea3 /mdmon.h | |
parent | mdmon: fix missing open of md/<dev>/recovery_start (diff) | |
download | mdadm-484240d8a3facde992009efd81bfa4cc0c79287d.tar.xz mdadm-484240d8a3facde992009efd81bfa4cc0c79287d.zip |
mdmon: periodically checkpoint recovery
The kernel updates and notifies md/sync_completed when it is time to
take a checkpoint. When this occurs (at 1/16 array size intervals)
write 'idle' to md/sync_action to have the current recovery position
updated in recovery_start and resync_start.
Requires the metadata handler to reset ->last_checkpoint when it has
determined that recovery has ended.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'mdmon.h')
-rw-r--r-- | mdmon.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -32,6 +32,15 @@ struct active_array { int action_fd; int resync_start_fd; int metadata_fd; /* for monitoring rw/ro status */ + int sync_completed_fd; /* for checkpoint notification events */ + unsigned long long last_checkpoint; /* sync_completed fires for many + * reasons this field makes sure the + * kernel has made progress before + * moving the checkpoint. It is + * cleared by the metadata handler + * when it determines recovery is + * terminated. + */ enum array_state prev_state, curr_state, next_state; enum sync_action prev_action, curr_action, next_action; |