From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Wed, 27 Mar 2019 06:35:32 -0600 Subject: [Cluster-devel] [PATCH 19/19] gfs2: clean_journal was setting sd_log_flush_head replaying other journals In-Reply-To: <20190327123532.27131-1-rpeterso@redhat.com> References: <20190327123532.27131-1-rpeterso@redhat.com> Message-ID: <20190327123532.27131-20-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 Function clean_journal was setting the value of sd_log_flush_head, but that's only a valid thing to do if it is replaying its own journal. If it's replaying another node's journal, that's completely wrong and will lead to multiple problems. Signed-off-by: Bob Peterson --- fs/gfs2/recovery.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 020cac0e1002..bee5758fd027 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -387,8 +387,10 @@ static void clean_journal(struct gfs2_jdesc *jd, { struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); - sdp->sd_log_flush_head = head->lh_blkno; - gfs2_replay_incr_blk(jd, &sdp->sd_log_flush_head); + if (jd->jd_jid == sdp->sd_lockstruct.ls_jid) { + sdp->sd_log_flush_head = head->lh_blkno; + gfs2_replay_incr_blk(jd, &sdp->sd_log_flush_head); + } gfs2_write_log_header(sdp, jd, head->lh_sequence + 1, 0, GFS2_LOG_HEAD_UNMOUNT | GFS2_LOG_HEAD_RECOVERY, REQ_PREFLUSH | REQ_FUA | REQ_META | REQ_SYNC); -- 2.20.1