Super block
只是在ext3的基础上扩展了一些字段,可以支持更大的硬盘和更大的文件。
如:s_blocks_count 修改为s_blocks_count_lo和s_blocks_count_hi
结构体如下:
/*
*Structure of the super block
*/
struct ext4_super_block {
/*00*/ __le32 s_inodes_count; /* Inodes count文件系统中inode的总数*/
__le32 s_blocks_count_lo; /* Blocks count文件系统中块的总数*/
__le32 s_r_blocks_count_lo; /* Reserved blocks count保留块的总数*/
__le32 s_free_blocks_count_lo; /*Free blocks count未使用的块的总数(包括保留块)*/
/*10*/ __le32 s_free_inodes_count; /* Free inodes count未使用的inode的总数*/
__le32 s_first_data_block; /* First Data Block第一块块ID,在小于1KB的文件系统中为0,大于1KB的文件系统中为1*/
__le32 s_log_block_size; /* Block size用以计算块的大小(1024算术左移该值即为块大小)(0=1K, 1=2K, 2=4K) */
__le32 s_obso_log_frag_size; /* Obsoleted fragment size用以计算段大小(为正则1024算术左移该值,否则右移)*/
/*20*/ __le32 s_blocks_per_group; /* # Blocks per group每个块组中块的总数*/
__le32 s_obso_frags_per_group; /*Obsoleted fragments per group每个块组中段的总数*/
__le32 s_inodes_per_group; /* # Inodes per group每个块组中inode的总数*/
__le32 s_mtime; /* Mount time POSIX中定义的文件系统装载时间*/
/*30*/ __le32 s_wtime; /* Write time POSIX中定义的文件系统最近被写入的时间*/
__le16 s_mnt_count; /* Mount count最近一次完整校验后被装载的次数*/
__le16 s_max_mnt_count; /* Maximal mount count在进行完整校验前还能被装载的次数*/
__le16 s_magic; /* Magic signature文件系统标志*/
__le16 s_state; /* File system state文件系统的状态*/
__le16 s_errors; /* Behaviour when detectingerrors文件系统发生错误时驱动程序应该执行的操作*/
__le16 s_minor_rev_level; /* minor revision level局部修订级别*/
/*40*/ __le32 s_lastcheck; /* time of last check POSIX中定义的文件系统最近一次检查的时间*/
__le32 s_checkinterval; /* max. time between checks POSIX中定义的文件系统最近检查的最大时间间隔*/
__le32 s_creator_os; /* OS生成该文件系统的操作系统*/
__le32 s_rev_level; /* Revision level修订级别*/
/*50*/ __le16 s_def_resuid; /* Default uid for reserved blocks报留块的默认用户ID */
__le16 s_def_resgid; /* Default gid for reserved blocks保留块的默认组ID */
/*
* These fields are for EXT4_DYNAMIC_REV superblocks only.
*
* Note: the difference between the compatible feature set and
* the incompatible feature set is that if there is a bit set
* in the incompatible feature set tha