0x2800
부터 시작함.file의 block location의 m_block 배열에 0x21이 담겨있음.
→ root directory file의 block location은 0x21 * 0x400 = 0x8400
owner를 의미하는 m_uid가 0임을 알 수 있음
→ root 사용자를 의미함.
byte size를 의미하는 m_size가 0x400
→ 1024 bytes
block size를 의미하는 m_blocks가 0x02
→ 512bytes가 한 단위이므로, 1024 bytes
root directory file의 block location : 0x8400
→ 총 파일이 5개 존재함.
각 파일의 정보를 위와 같이 구별함.
각 파일의 정보
inode number(4 bytes) | record length(2 bytes) | name length(1 byte) | file type(1 byte) | file name |
---|---|---|---|---|
2 | 12 | 1 | 2 | . |
2 | 12 | 2 | 2 | .. |
11 (→ 0b) | 20 (→ 14) | 10 (→ 0a) | 2 | lost+found |
12 (→ 0c) | 12 (→ 0c) | 2 (→ 02) | 1 | f1 |
13 (→ 0d) | 0x03c8 = 968(DEC) | 2 (→ 02) | 1 | f2 |
inode
가 12일 때 블록은 0x2800 + 0x80 * (inode - 1) = 0x2d80
에 있다.
lost+found
block location : 0x22 * 0x400 = 0x8800
→ this file has multiple blocks : 22, 23, 24, …, 2d
f1
f2