From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Wed, 12 Mar 2014 14:48:15 +0000 Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Re-add a call to log_flush_wait when flushing the journal In-Reply-To: <489569871.13173225.1394634856079.JavaMail.zimbra@redhat.com> References: <489569871.13173225.1394634856079.JavaMail.zimbra@redhat.com> Message-ID: <1394635695.2729.61.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On Wed, 2014-03-12 at 10:34 -0400, Bob Peterson wrote: > 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 > Well spotted! Looks good. I've added this to the -nmw tree as well. Thanks, Steve. > Signed-off-by: Bob Peterson > --- > diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c > index edbd461..4a14d50 100644 > --- a/fs/gfs2/log.c > +++ b/fs/gfs2/log.c > @@ -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 */ >