ext4_extent: some comments cleanup in ext4_ext_correct_indexes.
[lwext4.git] / lwext4 / ext4_types.h
index 45b203f4fe515de73185ba30cc142163f307963d..03d680f02ce5e416fa17160cb81563f06b5bef94 100644 (file)
@@ -48,7 +48,7 @@ extern "C" {
 
 #include "ext4_config.h"
 #include "ext4_blockdev.h"
-#include "tree.h"
+#include "misc/tree.h"
 
 #include <stddef.h>
 #include <stdint.h>
@@ -306,6 +306,10 @@ struct ext4_fs {
        uint64_t inode_blocks_per_level[4];
 
        uint32_t last_inode_bg_id;
+
+       struct jbd_fs *jbd_fs;
+       struct jbd_journal *jbd_journal;
+       struct jbd_trans *curr_trans;
 };
 
 /* Inode table/bitmap not in use */
@@ -1094,10 +1098,12 @@ struct jbd_fs {
 };
 
 struct jbd_buf {
+       uint64_t jbd_lba;
        struct ext4_block block;
        struct jbd_trans *trans;
        struct jbd_block_rec *block_rec;
-       LIST_ENTRY(jbd_buf) buf_node;
+       TAILQ_ENTRY(jbd_buf) buf_node;
+       TAILQ_ENTRY(jbd_buf) dirty_buf_node;
 };
 
 struct jbd_revoke_rec {
@@ -1110,6 +1116,8 @@ struct jbd_block_rec {
        struct ext4_buf *buf;
        struct jbd_trans *trans;
        RB_ENTRY(jbd_block_rec) block_rec_node;
+       LIST_ENTRY(jbd_block_rec) tbrec_node;
+       TAILQ_HEAD(jbd_buf_dirty, jbd_buf) dirty_buf_queue;
 };
 
 struct jbd_trans {
@@ -1118,13 +1126,15 @@ struct jbd_trans {
        uint32_t start_iblock;
        int alloc_blocks;
        int data_cnt;
+       uint32_t data_csum;
        int written_cnt;
        int error;
 
        struct jbd_journal *journal;
 
-       LIST_HEAD(jbd_trans_buf, jbd_buf) buf_list;
+       TAILQ_HEAD(jbd_trans_buf, jbd_buf) buf_queue;
        LIST_HEAD(jbd_revoke_list, jbd_revoke_rec) revoke_list;
+       LIST_HEAD(jbd_trans_block_rec, jbd_block_rec) tbrec_list;
        TAILQ_ENTRY(jbd_trans) trans_node;
 };