Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38655
b: refs/heads/master
c: c63e31c
h: refs/heads/master
i:
  38653: dfc18f4
  38651: 5bf1271
  38647: 9c14369
  38639: 75ef684
  38623: 822063a
  38591: 1fb9a1c
  38527: 12f6d91
  38399: b590829
v: v3
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Apr 20, 2006
1 parent 39766c0 commit 7b8362b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 190562bd84a484bf6590425aa2bb4d6d611c112b
refs/heads/master: c63e31c2cc1ec67372920b5e1aff8204d04dd172
5 changes: 2 additions & 3 deletions trunk/fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
13 changes: 5 additions & 8 deletions trunk/fs/gfs2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,15 +418,14 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
/**
* gfs2_recover_journal - recovery a given journal
* @jd: the struct gfs2_jdesc describing the journal
* @wait: Don't return until the journal is clean (or an error is encountered)
*
* Acquire the journal's lock, check to see if the journal is clean, and
* do recovery if necessary.
*
* Returns: errno
*/

int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait)
int gfs2_recover_journal(struct gfs2_jdesc *jd)
{
struct gfs2_inode *ip = jd->jd_inode->u.generic_ip;
struct gfs2_sbd *sdp = ip->i_sbd;
Expand All @@ -441,12 +440,10 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait)

/* Aquire the journal lock so we can do recovery */

error = gfs2_glock_nq_num(sdp,
jd->jd_jid, &gfs2_journal_glops,
error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops,
LM_ST_EXCLUSIVE,
LM_FLAG_NOEXP |
((wait) ? 0 : LM_FLAG_TRY) |
GL_NOCACHE, &j_gh);
LM_FLAG_NOEXP | LM_FLAG_TRY | GL_NOCACHE,
&j_gh);
switch (error) {
case 0:
break;
Expand Down Expand Up @@ -574,7 +571,7 @@ void gfs2_check_journals(struct gfs2_sbd *sdp)
break;

if (jd != sdp->sd_jdesc)
gfs2_recover_journal(jd, NO_WAIT);
gfs2_recover_journal(jd);
}
}

2 changes: 1 addition & 1 deletion trunk/fs/gfs2/recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void gfs2_revoke_clean(struct gfs2_sbd *sdp);

int gfs2_find_jhead(struct gfs2_jdesc *jd,
struct gfs2_log_header *head);
int gfs2_recover_journal(struct gfs2_jdesc *gfs2_jd, int wait);
int gfs2_recover_journal(struct gfs2_jdesc *gfs2_jd);
void gfs2_check_journals(struct gfs2_sbd *sdp);

#endif /* __RECOVERY_DOT_H__ */
Expand Down

0 comments on commit 7b8362b

Please sign in to comment.