Introduction - If you have any usage issues, please Google them yourself
In the ext2 file system, the file is uniquely identified by the inode, which contains all the information in the file. A file may correspond to multiple filenames, which are deleted only after all file names have been deleted. In addition, the inode that corresponds to the same file when it is stored and opened on disk is different and is synchronized by the kernel.
The data structures in the ext2 file volume include: superblock, group descriptor, inode, etc.
The ext2 file system USES three-level indirect blocks to store data block Pointers and allocate space to units (blocks, by default, 1KB). The disk allocation policy is to assign logical adjacent files to physically adjacent blocks on disk, and to allocate as much as possible to as few files as possible to improve performance globally. The ext2 file system puts all of the files in the same directory (including directories) as much as possible in the same block group, but the directories are distributed across the blocks to achieve load balancing. When you expand the file, you will try to extend as many as eight consecutive blocks to the file.
The definitions of each structure in the ext2 system are included in the include/Linux/ext2_fs.h file in the source code.