shithub: lwext4

Download patch

ref: 679728c0312fcc766e5ca5aafcfa7fa53406ebae
parent: f7eb061d6c5e916767b66d952993bbb66d0fc8f7
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Fri Dec 4 07:59:57 EST 2015

ext4_journal: add transaction in-memory structure.

--- a/lwext4/ext4_types.h
+++ b/lwext4/ext4_types.h
@@ -1093,6 +1093,33 @@
 	bool dirty;
 };
 
+struct jbd_buf {
+	struct ext4_block block;
+	struct ext4_block block_jbd;
+
+	struct jbd_trans *trans;
+
+	LIST_ENTRY(jbd_buf) buf_node;
+};
+
+struct jbd_trans {
+	uint32_t trans_id;
+	LIST_HEAD(jbd_trans_buf, jbd_buf) buf_list;
+	LIST_ENTRY(jbd_trans) trans_node;
+};
+
+struct jbd_journal {
+	uint32_t first;
+	uint32_t start;
+	uint32_t last;
+	uint32_t first_trans_id;
+	uint32_t last_trans_id;
+
+	LIST_HEAD(jbd_trans_list, jbd_trans) trans_list;
+
+	struct jbd_fs *jbd_fs;
+};
+
 /*****************************************************************************/
 
 #define EXT4_CRC32_INIT (0xFFFFFFFFUL)