Inode pointer structure
![]() The inode pointer structure is a structure adopted by the inode of a file in the Version 6 Unix file system, Version 7 Unix file system, and Unix File System (UFS) to list the addresses of a file's data blocks. It is also adopted by many related file systems, including the ext3 file system, popular with Linux users. StructureIn the file system used in Version 6 Unix, an inode contains eight pointers:[1]
In the file system used in Version 7 Unix, an inode contains thirteen pointers:[2]
In the Unix file system, an inode contains fifteen pointers:[3]
The levels of indirection indicate the number of pointer that must be followed before reaching actual file data. Key featuresFixed logical block sizeThe structure is partially illustrated in the diagram accompanying this article. The structure allows for inodes to describe very large files in file systems with a fixed logical block size. Central to the mechanism is that blocks of addresses (also called indirect blocks) are only allocated as needed. For example, in the Unix file system, a 12-block file would be described using just the inode because its blocks fit into the number of direct pointers available. However, a 13-block file needs an indirect block to contain the thirteenth address. Ease of data locationThe inode pointer structure not only allows for files to easily be allocated to non-contiguous blocks, it also allows the data at a particular location inside a file to be easily located. This is possible because the logical block size is fixed. For example, if each block is 8 kB, file data at 112 kB to 120 kB would be pointed to by the third pointer of the first indirect block (assuming twelve direct pointers in the inode pointer structure). Indirect blocksUnlike inodes, which are fixed in number and allocated in a special part of the file system, the indirect blocks may be of any number and are allocated in the same part of the file system as data blocks. The number of pointers in the indirect blocks is dependent on the block size and size of block pointers. Example: with a 512-byte block size, and 4-byte block pointers, each indirect block can consist of 128 (512 / 4) pointers. References
|
Portal di Ensiklopedia Dunia