digraph {
rankdir=LR;
node [shape=plaintext];
subgraph cluster__ext2 {
label="Ext2";
graph[style=dotted];
ext2__seq [label=<
>];
ext2__inst__bg1 [label=<
pos | size | type | id |
1024 | ... | BlockGroup | bg1 |
>];
ext2__inst__root_dir [label=<
id | value |
root_dir | bg1.block_groups[0].inodes[1].as_dir |
>];
subgraph cluster__super_block_struct {
label="Ext2::SuperBlockStruct";
graph[style=dotted];
super_block_struct__seq [label=<
pos | size | type | id |
0 | 4 | u4le | inodes_count |
4 | 4 | u4le | blocks_count |
8 | 4 | u4le | r_blocks_count |
12 | 4 | u4le | free_blocks_count |
16 | 4 | u4le | free_inodes_count |
20 | 4 | u4le | first_data_block |
24 | 4 | u4le | log_block_size |
28 | 4 | u4le | log_frag_size |
32 | 4 | u4le | blocks_per_group |
36 | 4 | u4le | frags_per_group |
40 | 4 | u4le | inodes_per_group |
44 | 4 | u4le | mtime |
48 | 4 | u4le | wtime |
52 | 2 | u2le | mnt_count |
54 | 2 | u2le | max_mnt_count |
56 | 2 | | magic |
58 | 2 | u2le→StateEnum | state |
60 | 2 | u2le→ErrorsEnum | errors |
62 | 2 | u2le | minor_rev_level |
64 | 4 | u4le | lastcheck |
68 | 4 | u4le | checkinterval |
72 | 4 | u4le | creator_os |
76 | 4 | u4le | rev_level |
80 | 2 | u2le | def_resuid |
82 | 2 | u2le | def_resgid |
84 | 4 | u4le | first_ino |
88 | 2 | u2le | inode_size |
90 | 2 | u2le | block_group_nr |
92 | 4 | u4le | feature_compat |
96 | 4 | u4le | feature_incompat |
100 | 4 | u4le | feature_ro_compat |
104 | 16 | | uuid |
120 | 16 | | volume_name |
136 | 64 | | last_mounted |
200 | 4 | u4le | algo_bitmap |
204 | 1 | u1 | prealloc_blocks |
205 | 1 | u1 | prealloc_dir_blocks |
206 | 2 | | padding1 |
208 | 16 | | journal_uuid |
224 | 4 | u4le | journal_inum |
228 | 4 | u4le | journal_dev |
232 | 4 | u4le | last_orphan |
236 | 4 | u4le | hash_seed |
repeat 4 times |
252 | 1 | u1 | def_hash_version |
>];
super_block_struct__inst__block_size [label=<
id | value |
block_size | (1024 << log_block_size) |
>];
super_block_struct__inst__block_group_count [label=<
id | value |
block_group_count | (blocks_count / blocks_per_group) |
>];
}
subgraph cluster__dir_entry {
label="Ext2::DirEntry";
graph[style=dotted];
dir_entry__seq [label=<
pos | size | type | id |
0 | 4 | u4le | inode_ptr |
4 | 2 | u2le | rec_len |
6 | 1 | u1 | name_len |
7 | 1 | u1→FileTypeEnum | file_type |
8 | name_len | str(UTF-8) | name |
... | ((rec_len - name_len) - 8) | | padding |
>];
dir_entry__inst__inode [label=<
id | value |
inode | _root.bg1.block_groups[((inode_ptr - 1) / _root.bg1.super_block.inodes_per_group)].inodes[((inode_ptr - 1) % _root.bg1.super_block.inodes_per_group)] |
>];
}
subgraph cluster__inode {
label="Ext2::Inode";
graph[style=dotted];
inode__seq [label=<
pos | size | type | id |
0 | 2 | u2le | mode |
2 | 2 | u2le | uid |
4 | 4 | u4le | size |
8 | 4 | u4le | atime |
12 | 4 | u4le | ctime |
16 | 4 | u4le | mtime |
20 | 4 | u4le | dtime |
24 | 2 | u2le | gid |
26 | 2 | u2le | links_count |
28 | 4 | u4le | blocks |
32 | 4 | u4le | flags |
36 | 4 | u4le | osd1 |
40 | 4 | BlockPtr | block |
repeat 15 times |
100 | 4 | u4le | generation |
104 | 4 | u4le | file_acl |
108 | 4 | u4le | dir_acl |
112 | 4 | u4le | faddr |
116 | 12 | | osd2 |
>];
inode__inst__as_dir [label=<
pos | size | type | id |
0 | ... | Dir | as_dir |
>];
}
subgraph cluster__block_ptr {
label="Ext2::BlockPtr";
graph[style=dotted];
block_ptr__seq [label=<>];
block_ptr__inst__body [label=<
pos | size | type | id |
(ptr * _root.bg1.super_block.block_size) | _root.bg1.super_block.block_size | RawBlock | body |
>];
}
subgraph cluster__dir {
label="Ext2::Dir";
graph[style=dotted];
dir__seq [label=<
pos | size | type | id |
0 | ... | DirEntry | entries |
repeat to end of stream |
>];
}
subgraph cluster__block_group {
label="Ext2::BlockGroup";
graph[style=dotted];
block_group__seq [label=<
pos | size | type | id |
0 | 1024 | SuperBlockStruct | super_block |
1024 | 32 | Bgd | block_groups |
repeat super_block.block_group_count times |
>];
}
subgraph cluster__bgd {
label="Ext2::Bgd";
graph[style=dotted];
bgd__seq [label=<
pos | size | type | id |
0 | 4 | u4le | block_bitmap_block |
4 | 4 | u4le | inode_bitmap_block |
8 | 4 | u4le | inode_table_block |
12 | 2 | u2le | free_blocks_count |
14 | 2 | u2le | free_inodes_count |
16 | 2 | u2le | used_dirs_count |
18 | (2 + 12) | | pad_reserved |
>];
bgd__inst__block_bitmap [label=<
pos | size | type | id |
(block_bitmap_block * _root.bg1.super_block.block_size) | 1024 | | block_bitmap |
>];
bgd__inst__inode_bitmap [label=<
pos | size | type | id |
(inode_bitmap_block * _root.bg1.super_block.block_size) | 1024 | | inode_bitmap |
>];
bgd__inst__inodes [label=<
pos | size | type | id |
(inode_table_block * _root.bg1.super_block.block_size) | 128 | Inode | inodes |
repeat _root.bg1.super_block.inodes_per_group times |
>];
}
subgraph cluster__raw_block {
label="Ext2::RawBlock";
graph[style=dotted];
raw_block__seq [label=<
pos | size | type | id |
0 | _root.bg1.super_block.block_size | | body |
>];
}
}
ext2__inst__bg1:bg1_type -> block_group__seq [style=bold];
inode__inst__as_dir:as_dir_type -> ext2__inst__root_dir [color="#404040"];
super_block_struct__seq:log_block_size_type -> super_block_struct__inst__block_size [color="#404040"];
super_block_struct__seq:blocks_count_type -> super_block_struct__inst__block_group_count [color="#404040"];
super_block_struct__seq:blocks_per_group_type -> super_block_struct__inst__block_group_count [color="#404040"];
dir_entry__seq:name_len_type -> dir_entry__seq:name_size [color="#404040"];
dir_entry__seq:rec_len_type -> dir_entry__seq:padding_size [color="#404040"];
dir_entry__seq:name_len_type -> dir_entry__seq:padding_size [color="#404040"];
bgd__inst__inodes:inodes_type -> dir_entry__inst__inode [color="#404040"];
dir_entry__seq:inode_ptr_type -> dir_entry__inst__inode [color="#404040"];
super_block_struct__seq:inodes_per_group_type -> dir_entry__inst__inode [color="#404040"];
inode__seq:block_type -> block_ptr__seq [style=bold];
inode__inst__as_dir:as_dir_type -> dir__seq [style=bold];
block_ptr__seq:ptr_type -> block_ptr__inst__body:body_pos [color="#404040"];
super_block_struct__inst__block_size:block_size_type -> block_ptr__inst__body:body_pos [color="#404040"];
super_block_struct__inst__block_size:block_size_type -> block_ptr__inst__body:body_size [color="#404040"];
block_ptr__inst__body:body_type -> raw_block__seq [style=bold];
dir__seq:entries_type -> dir_entry__seq [style=bold];
block_group__seq:super_block_type -> super_block_struct__seq [style=bold];
block_group__seq:block_groups_type -> bgd__seq [style=bold];
super_block_struct__inst__block_group_count:block_group_count_type -> block_group__seq:block_groups__repeat [color="#404040"];
bgd__seq:block_bitmap_block_type -> bgd__inst__block_bitmap:block_bitmap_pos [color="#404040"];
super_block_struct__inst__block_size:block_size_type -> bgd__inst__block_bitmap:block_bitmap_pos [color="#404040"];
bgd__seq:inode_bitmap_block_type -> bgd__inst__inode_bitmap:inode_bitmap_pos [color="#404040"];
super_block_struct__inst__block_size:block_size_type -> bgd__inst__inode_bitmap:inode_bitmap_pos [color="#404040"];
bgd__seq:inode_table_block_type -> bgd__inst__inodes:inodes_pos [color="#404040"];
super_block_struct__inst__block_size:block_size_type -> bgd__inst__inodes:inodes_pos [color="#404040"];
bgd__inst__inodes:inodes_type -> inode__seq [style=bold];
super_block_struct__seq:inodes_per_group_type -> bgd__inst__inodes:inodes__repeat [color="#404040"];
super_block_struct__inst__block_size:block_size_type -> raw_block__seq:body_size [color="#404040"];
}