summaryrefslogtreecommitdiff
path: root/include/ext4_fs.h
diff options
context:
space:
mode:
authorngkaho1234 <ngkaho1234@gmail.com>2016-01-31 22:31:05 +0800
committerngkaho1234 <ngkaho1234@gmail.com>2016-01-31 15:57:43 +0000
commit252c506239ab570c0f671513a3b17d3a44f86b5c (patch)
tree205681753f461e59880c2447588efd710b182746 /include/ext4_fs.h
parent3e42ad4c558d5f3e12cdf22f4d6610836c7df129 (diff)
Refactor header files dependencies.
Diffstat (limited to 'include/ext4_fs.h')
-rw-r--r--include/ext4_fs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/ext4_fs.h b/include/ext4_fs.h
index 473929d..ba55da9 100644
--- a/include/ext4_fs.h
+++ b/include/ext4_fs.h
@@ -48,10 +48,36 @@ extern "C" {
#include "ext4_config.h"
#include "ext4_types.h"
+#include "ext4_misc.h"
#include <stdint.h>
#include <stdbool.h>
+struct ext4_fs {
+ bool read_only;
+
+ struct ext4_blockdev *bdev;
+ struct ext4_sblock sb;
+
+ uint64_t inode_block_limits[4];
+ 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;
+};
+
+struct ext4_block_group_ref {
+ struct ext4_block block;
+ struct ext4_bgroup *block_group;
+ struct ext4_fs *fs;
+ uint32_t index;
+ bool dirty;
+};
+
+
/**@brief Convert block address to relative index in block group.
* @param sb Superblock pointer
* @param baddr Block number to convert