Data block map

As mentioned before, each inode should record the locations of data blocks in which corresponding file data is stored. Depending on the length of file data, each file might occupy n number of data blocks. There are various methods used to track data block details in an inode; the simplest being direct references, which involves the inode containing direct pointers to data blocks of the file. The number of such direct pointers would depend on filesystem design, and most implementations choose to engage fewer bytes for such pointers. This method is productive for small files which span across a few data blocks (usually < 16k), but lacks support for large files spread across numerous data blocks:

To support large files, filesystems ...

Get Mastering Linux Kernel Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.