Given the vast array of file systems out there, I'm certain that exceptions exist, but traditionally, the inode had an array of disk block numbers in it.
For example, in /usr/include/linux/ext3_fs.h
, I see a definition of struct ext3_inode
.
Inside struct ext3_inode
, I see a member i_block[EXT3_N_BLOCKS];/* Pointers to blocks */
Different file systems have had different ways of keeping track of which disk blocks belong to an inode (the on-disk data structure that represents the file's data). Some have an array of block numbers, some have an array of runs or extents, a count plus the beginning block number of a run of contiguous blocks. The Berkeley FFS inode had an array of block numbers, and array of block numbers, each of those blocks contained data block numbers, and a block number that contained block numbers that contained data block numbers.
The whole thing gets a bit weirder for "log structured file systems", but those are the exception rather than the rule.