I was reading the Kernel Documentation where it says
There are various limits imposed by the on-disk layout of ext2. Other limits are imposed by the current implementation of the kernel code. Many of the limits are determined at the time the filesystem is first created, and depend upon the block size chosen. The ratio of inodes to data blocks is fixed at filesystem creation time, so the only way to increase the number of inodes is to increase the size of the filesystem.
For 4Kb block size, the file size is 2048GB.
I have also read that during data block allocation it uses direct, double or triple indirection to data blocks. Whether it is the main factor ?