forked from ihaku4/c-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVFS.note
More file actions
42 lines (38 loc) · 859 Bytes
/
VFS.note
File metadata and controls
42 lines (38 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
file_struct
file
f_flags, f_pos, f_count, f_op, f_dentry
file_operations
IIseek, read, write, ioctl, open, release
inode_operations
link, unlink, symlink, mkdir, rmdir, rename, readlink, truncate
inode
i_uid, i_size, i_mode, i_op, i_sb
dentry cache
super_block
s_type, s_blocksize, s_root
disk
---------
PCB(Process Control Block)
文件描述符表 文件描述符
指针
file 结构体
File Status Flag (f_flag)
当前读写位置 (f_pos)
f_count: Reference Count
dup, fork
close
file_operations
dentry
open, stat
dentry cache
inode
inode_operations
super_block
s_root -> a certain dentry
VFS core concept:
these structs:
file, dentry, inode, superblock
ext2 VS
FAT32, NTFS of Windows: no concept of "inode" or "pemission"
--------- dup and dup2
open? which