summaryrefslogtreecommitdiff
path: root/mdmon.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-05-14 17:42:49 -0700
committerDan Williams <dan.j.williams@intel.com>2010-05-14 17:42:49 -0700
commit484240d8a3facde992009efd81bfa4cc0c79287d (patch)
treee8caef63af97a57817ab331256528f0836737ea3 /mdmon.h
parent63b4aae33ebf00d443378daf313622630f2336c0 (diff)
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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/mdmon.h b/mdmon.h
index 20a0a013..5c515663 100644
--- a/mdmon.h
+++ b/mdmon.h
@@ -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;