Next | Internals of ext2fs | 16 |
As we saw before, the superblock structure has a slot in it for FS-specific data:
struct super_block { ... union { ... struct ext2_sb_info ext2_sb; ... } u; ... };
The struct ext2_sb_info is defined in include/linux/ext2_fs_sb.h:
struct ext2_sb_info { unsigned long s_frag_size; /* Size of a fragment in bytes */ unsigned long s_frags_per_block;/* Number of fragments per block */ unsigned long s_inodes_per_block;/* Number of inodes per block */ unsigned long s_frags_per_group;/* Number of fragments in a group */ unsigned long s_blocks_per_group;/* Number of blocks in a group */ unsigned long s_inodes_per_group;/* Number of inodes in a group */ ... }
ext2_read_super reads this stuff in too, or computes it
Next | Copyright © 2001 M. J. Dominus |