ext4_filedev: fix travis build
[lwext4.git] / lwext4 / ext4_types.h
index 23a3e83d0e89d8383b30f23eda337c1117686b8a..3f5ad79822c94ef55b8cf2be9c7e15376f6f52c7 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 */
@@ -1096,6 +1100,7 @@ struct jbd_fs {
 struct jbd_buf {
        struct ext4_block block;
        struct jbd_trans *trans;
+       struct jbd_block_rec *block_rec;
        LIST_ENTRY(jbd_buf) buf_node;
 };
 
@@ -1104,9 +1109,17 @@ struct jbd_revoke_rec {
        LIST_ENTRY(jbd_revoke_rec) revoke_node;
 };
 
+struct jbd_block_rec {
+       ext4_fsblk_t lba;
+       struct ext4_buf *buf;
+       struct jbd_trans *trans;
+       RB_ENTRY(jbd_block_rec) block_rec_node;
+};
+
 struct jbd_trans {
        uint32_t trans_id;
 
+       uint32_t start_iblock;
        int alloc_blocks;
        int data_cnt;
        int written_cnt;
@@ -1130,6 +1143,7 @@ struct jbd_journal {
 
        TAILQ_HEAD(jbd_trans_queue, jbd_trans) trans_queue;
        TAILQ_HEAD(jbd_cp_queue, jbd_trans) cp_queue;
+       RB_HEAD(jbd_block, jbd_block_rec) block_rec_root;
 
        struct jbd_fs *jbd_fs;
 };