Even though the Ext2 filesystem adopts the classic Unix scheme of implementing files by means of linked inodes, further problems of little consequence in an abstract concept need to be addressed. Hard disks are divided into blocks that are occupied by files. How many blocks a particular file occupies depends on the size of the file contents (and, of course, on the size of the block itself).

Like system memory, which, in the view of the kernel, is divided into pages of equal size and is addressed by unique numbers or pointers, all hard disk blocks are uniquely identified by a number. This enables the file metadata stored in the inode structure to be associated with the file contents located in the data block sections on hard disk. The link between the two is established by storing the addresses of the data blocks in the inode.

Continue reading here: Files do not necessarily occupy successive data blocks although this would be desirable for performance reasons but are spread over the entire hard disk

Was this article helpful?

0 0