[Ocfs2-tools-devel] [PATCH 1/2] fsck.ocfs2: fix journal tail wrapper

Junxiao Bi junxiao.bi at oracle.com
Wed May 27 20:11:16 PDT 2015


If there is one transaction, its last block but one located at the
tail of the journal and its last commit block located at the head
of the journal, Crash the kernel and when fsck.ocfs2 -a run during
the reboot, the journal replay will fail due to the wrapper error.
This will make all the following transaction starting from the journal
head lost, and this will corrupt the fs.

Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
---
 fsck.ocfs2/journal.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fsck.ocfs2/journal.c b/fsck.ocfs2/journal.c
index ff47633..bc84652 100644
--- a/fsck.ocfs2/journal.c
+++ b/fsck.ocfs2/journal.c
@@ -339,6 +339,7 @@ static errcode_t replay_blocks(ocfs2_filesys *fs, struct journal_info *ji,
 			tagp += 16;
 	}
 	
+	*next_block = jwrap(ji->ji_jsb, *next_block);
 out:
 	if (io_buf)
 		ocfs2_free(&io_buf);
-- 
1.7.9.5




More information about the Ocfs2-tools-devel mailing list