Skip to content

Commit

Permalink
GFS2: Re-add a call to log_flush_wait when flushing the journal
Browse files Browse the repository at this point in the history
Upstream commit 34cc178 changed a line of code from calling function
log_flush_commit to calling log_write_header. This had the effect of
eliminating a call to function log_flush_wait. That causes the journal
to skip over log headers, which results in multiple wrap points,
which itself leads to infinite loops in journal replay, both in the
kernel code and fsck.gfs2 code. This patch re-adds that call.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Mar 12, 2014
1 parent 01b172b commit 428fd95
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl)
gfs2_log_flush_bio(sdp, WRITE);

if (sdp->sd_log_head != sdp->sd_log_flush_head) {
log_flush_wait(sdp);
log_write_header(sdp, 0);
} else if (sdp->sd_log_tail != current_tail(sdp) && !sdp->sd_log_idle){
atomic_dec(&sdp->sd_log_blks_free); /* Adjust for unreserved buffer */
Expand Down

0 comments on commit 428fd95

Please sign in to comment.