shithub: lwext4

Download patch

ref: fb6fd61f3ec5bc98fab5ad8e0d6fec95c70d643a
parent: 384424b2e0043f0aaf6fdeece1f6b7f54e897c5a
author: Kaho Ng <ngkaho1234@gmail.com>
date: Thu Sep 22 11:21:51 EDT 2016

ext4_journal: modify the first 4 bytes of the logged block when needed

--- a/src/ext4_journal.c
+++ b/src/ext4_journal.c
@@ -1980,6 +1980,9 @@
 		data = data_block.data;
 		memcpy(data, jbd_buf->block.data,
 			journal->block_size);
+		if (is_escape)
+			((struct jbd_bhdr *)data)->magic = 0;
+
 		ext4_bcache_set_dirty(data_block.buf);
 		ext4_bcache_set_flag(data_block.buf, BC_TMP);
 		rc = jbd_block_set(journal->jbd_fs, &data_block);