diff options
author | David Teigland <teigland@redhat.com> | 2012-01-09 17:18:05 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-01-11 04:23:05 -0500 |
commit | e0c2a9aa1e68455dc3439e95d85cabcaff073666 (patch) | |
tree | 22e0dea3972d74defb0219fbbcd5c9d395c0bdb3 /fs/gfs2/recovery.c | |
parent | e343a895a9f342f239c5e3c5ffc6c0b1707e6244 (diff) |
GFS2: dlm based recovery coordination
This new method of managing recovery is an alternative to
the previous approach of using the userland gfs_controld.
- use dlm slot numbers to assign journal id's
- use dlm recovery callbacks to initiate journal recovery
- use a dlm lock to determine the first node to mount fs
- use a dlm lock to track journals that need recovery
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r-- | fs/gfs2/recovery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index f2a02edcac8f..af49e8f432fe 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c | |||
@@ -436,12 +436,16 @@ static void gfs2_recovery_done(struct gfs2_sbd *sdp, unsigned int jid, | |||
436 | char env_status[20]; | 436 | char env_status[20]; |
437 | char *envp[] = { env_jid, env_status, NULL }; | 437 | char *envp[] = { env_jid, env_status, NULL }; |
438 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; | 438 | struct lm_lockstruct *ls = &sdp->sd_lockstruct; |
439 | |||
439 | ls->ls_recover_jid_done = jid; | 440 | ls->ls_recover_jid_done = jid; |
440 | ls->ls_recover_jid_status = message; | 441 | ls->ls_recover_jid_status = message; |
441 | sprintf(env_jid, "JID=%d", jid); | 442 | sprintf(env_jid, "JID=%d", jid); |
442 | sprintf(env_status, "RECOVERY=%s", | 443 | sprintf(env_status, "RECOVERY=%s", |
443 | message == LM_RD_SUCCESS ? "Done" : "Failed"); | 444 | message == LM_RD_SUCCESS ? "Done" : "Failed"); |
444 | kobject_uevent_env(&sdp->sd_kobj, KOBJ_CHANGE, envp); | 445 | kobject_uevent_env(&sdp->sd_kobj, KOBJ_CHANGE, envp); |
446 | |||
447 | if (sdp->sd_lockstruct.ls_ops->lm_recovery_result) | ||
448 | sdp->sd_lockstruct.ls_ops->lm_recovery_result(sdp, jid, message); | ||
445 | } | 449 | } |
446 | 450 | ||
447 | void gfs2_recover_func(struct work_struct *work) | 451 | void gfs2_recover_func(struct work_struct *work) |