GFS2: Re-add a call to log_flush_wait when flushing the journal
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 GFS2: Re-add a call to log_flush_wait when flushing the journal
Hi,
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.
Regards,
Bob Peterson
Red Hat File Systems
---
fs/gfs2/log.c +1 -0
@@ -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 */
PATCH 1/1 GFS2: Re-add a call to log_flush_wait when flushing the journal
Hi,
Quoted 9 lines · Bob Peterson
Hi,
Upstream commit 34cc178 changed a line of code from calling function
log_flush_committo callinglog_write_header. This had the effect of eliminating a call to functionlog_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.
Quoted 5 lines
Regards,
Bob Peterson
Red Hat File Systems
Well spotted! Looks good. I've added this to the -nmw tree as well. Thanks,
Steve.
Quoted 15 lines
Signed-off-by Bob Peterson <[email protected]>---
fs/gfs2/log.c +1
-0@@ -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 */