I used to be a file systems developer some years ago.
Using the material provided in the link ...
Any file offset in the range of 0 .. (80 kB - 1) inclusive can be accessed using the direct blocks stored in the inode. This is derived from the fact that there are ten 8 kB blocks.
As a disc block is 8 kB (8192 bytes), and disc addresses are 32 bits (4 bytes), each disc block can hold up to 2048 (8192 / 4) disc address entries. This means that the singly indirect block can reference up to 2048 * 8 kB bytes of file data (16 MB). Extending this, we find that a doubly indirect block can reference up to 2048 * 2048 * 8kB of file data (32 GB).
Up to 80 kB of file data can be accessed using the direct blocks. This translates into file offsets 0 through (80 kB - 1) inclusive.
Up to 16 MB of file data can be accessed using the singly indirect block stored in the inode. This translates into files offsets 80 kB through (16 MB + 80 kB - 1) inclusive.
Up to 32 GB of file data can be accessed using the doubly indirect block stored in the inode. This translates into file offsets (16 MB + 80 kB) through (32 GB + 16 MB + 80 kB - 1) inclusive.
Up to 64 TB of file data can be accessed using the triply indirect block stored in the inode. This translates into file offsets (32 GB + 16 MB + 80 kB) through to (64 TB + 32 GB + 16 MB + 80 kB - 1)inclusive.
Consequently the theoretical maximum size of a file is 64 TB + 32 GB + 16 MB + 80 kB.
The practical maximum size is a different matter. It can be limited by any one or combination of the following:
- Size of the disc.
- Size of partition.
- Inherent file system meta-data limitations. Some file systems are not designed to address beyond size X, even though X is less than the theoretical maximum file size.
- Related to item 3, yet deserving of its own is the number of bits reserved in the inode to store the size of the file. If memory serves, the original Ext2 limited the file size to 32 bits. This created a (2 GB - 1) limit for the file size.
Some of the practical limitations can be "worked around" if the file system supports sparse files (the one described in the link probably does as it uses indirect blocks). Sparse files allow situations such as a 2 TB file "fitting" on a 1 GB disc without using 2 TB of actual disk space. Incidentally, this is one of the reasons why an inode may often contain information about the number of blocks actually used by the file.
Hope that helps.