Programming/Linux

Ext2 파일시스템의 구조(2)

Daniel˚ 2008. 3. 20. 01:32

An inode contains the following information about a file:
- The type of file and the access modes
- The UID and GID numbers of the file’s owner and group
- The size of the file
- The time the file was last accessed or modified, and the inode changed
- The total number of data blocks used by, or allocated to the file The inode contains two types of pointers:

direct pointers and indirect pointers.




Direct Pointers

There are 12 direct pointers, which refer directly to data blocks.

The 12 direct pointers can directly reference the data blocks for a file up to 96 Kbytes.


Indirect Pointers


The three types of indirect pointers are:


Single indirect pointer – A single indirect pointers refers to a file system block containing pointers to data blocks. This file system block contains 2048 additional addresses of 8-Kbyte data blocks, which can point to an additional 16 Mytes of data.


Double indirect pointer – A double indirect pointer refers to a file system
block containing single indirect pointers. Each indirect pointer refers to a
file system block containing the data block pointers. Double indirect
pointers points to an additional 32 Gbytes of data.


Triple indirect pointer – A triple indirect pointer can reference up to an dditional 70 Tbytes of data. However,

the maximum file size is limited to 1 Tbyte in a ufs file system.