From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Wed, 27 Mar 2019 06:35:25 -0600 Subject: [Cluster-devel] [PATCH 12/19] gfs2: If the journal isn't live ignore log flushes In-Reply-To: <20190327123532.27131-1-rpeterso@redhat.com> References: <20190327123532.27131-1-rpeterso@redhat.com> Message-ID: <20190327123532.27131-13-rpeterso@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch adds a check to function gfs2_log_flush: if the journal is no longer live, the flush is ignored. Signed-off-by: Bob Peterson --- fs/gfs2/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 896165811063..cd2f54db7f8a 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c @@ -782,6 +782,9 @@ void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl, u32 flags) struct gfs2_trans *tr; enum gfs2_freeze_state state = atomic_read(&sdp->sd_freeze_state); + if (!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) + return; + down_write(&sdp->sd_log_flush_lock); /* Log might have been flushed while we waited for the flush lock */ -- 2.20.1