From c63e31c2cc1ec67372920b5e1aff8204d04dd172 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 20 Apr 2006 17:03:48 -0400 Subject: [GFS2] journal recovery patch This is one of the changes related to journal recovery I mentioned a couple weeks ago. We can get into a situation where there are only readonly nodes currently mounting the fs, but there are journals that need to be recovered. Since the readonly nodes can't recover journals, the next rw mounter needs to go through and check all journals and recover any that are dirty (i.e. what the first node to mount the fs does). This rw mounter needs to skip the journals held by the existing readonly nodes. Skipping those journals amounts to using the TRY flag on the journal locks so acquiring the lock of a journal held by a readonly node will fail instead of blocking indefinately. Signed-off-by: David Teigland Signed-off-by: Steven Whitehouse --- fs/gfs2/ops_fstype.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'fs/gfs2/ops_fstype.c') diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 4538a1e621e..70745f3561a 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -444,8 +444,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) if (sdp->sd_lockstruct.ls_first) { unsigned int x; for (x = 0; x < sdp->sd_journals; x++) { - error = gfs2_recover_journal(gfs2_jdesc_find(sdp, x), - WAIT); + error = gfs2_recover_journal(gfs2_jdesc_find(sdp, x)); if (error) { fs_err(sdp, "error recovering journal %u: %d\n", x, error); @@ -455,7 +454,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) gfs2_lm_others_may_mount(sdp); } else if (!sdp->sd_args.ar_spectator) { - error = gfs2_recover_journal(sdp->sd_jdesc, WAIT); + error = gfs2_recover_journal(sdp->sd_jdesc); if (error) { fs_err(sdp, "error recovering my journal: %d\n", error); goto fail_jinode_gh; -- cgit v1.2.3