#include "ext4_config.h"
#include "ext4_blockdev.h"
-#include "tree.h"
+#include "misc/tree.h"
#include <stddef.h>
#include <stdint.h>
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 */
};
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 {
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 {
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;
};