aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc
diff options
context:
space:
mode:
authorMarvin Borner2021-09-12 17:00:09 +0200
committerMarvin Borner2021-09-12 17:00:09 +0200
commit421cebff27c591fe6e7102334e7a02dec197af94 (patch)
treea3e96386d870b5e5cb2d4bf143581070eac321bf /kernel/inc
parentf582a27638479da361c0f2e24501d6662e08b522 (diff)
Dynamic inode size detection using extensions
Diffstat (limited to 'kernel/inc')
-rw-r--r--kernel/inc/fs.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/kernel/inc/fs.h b/kernel/inc/fs.h
index 04d3624..210f0c2 100644
--- a/kernel/inc/fs.h
+++ b/kernel/inc/fs.h
@@ -112,6 +112,20 @@ struct ext2_superblock {
u32 major_version;
u16 res_block_uid;
u16 res_block_gid;
+ // From here on only if major_version >=1
+ u32 first_inode;
+ u16 inode_size;
+ u16 block_group_number;
+ u32 compatible_features;
+ u32 incompatible_features;
+ u32 ro_compatible_features;
+ u8 uuid[16];
+ char volume_name[16];
+ char last_mounted_dir[64];
+ u32 algorithm_usage;
+ u8 preallocate_blocks;
+ u8 preallocate_dir_blocks;
+ u8 padding[50]; // idk? Doesn't really matter
};
struct ext2_bgd {
@@ -152,8 +166,6 @@ struct ext2_inode {
u8 extension[128]; // TODO: 2038 extension time support
};
-#define EXT2_INODE_SIZE (sizeof(struct ext2_inode))
-
struct ext2_dirent {
u32 inode_num;
u16 total_len;