Windows
> mingw32-make.exe all
Linux
> make all
Block array -> Block set -> file -> directory -> file system
- Block
balloc()
andbfree()
- Using list or bitmap to manage blocks
bread()
andbwrite()
- File
- Directory
1980s, FAT was introduced. It is just for small files. Free list is used to manage blocks.
// {[data|next],[data,next],.......}
struct block{
char data[510];
uint16 next;
};
// or
// {next[0],next[1],.....} ..... {data[0],data[1],........}
// This is the method that FAT uses.
FAT-12/16/32 (FAT entry, which is size of next pointer in bits)
- 多用户
- 登陆
- 注册
- logout
- 文件系统操作
open
create
read
write
close
delete
mkdir
chdir
dir
format
https://wiki.osdev.org/Ext2#Inode_Type_and_Permissions The root directory is Inode 2.
Note that although both the superblock and the group descriptors are duplicated in each block group, only the superblock and the group descriptors included in block group 0 are used by the kernel, while the remaining superblocks and group descriptors are left unchanged.
get_inode
get_block
get_entry