0

From http://www.nongnu.org/ext2-doc/ext2.html#I-BLOCK I understand that if a file uses blocks 11, 12, 13, 14, 15, then the values 11, 12, 13, 14, and 15 are stored in the first 5 (of twelve) "direct block" entries in the inode.

Why doesn't it use a series of "ranges" instead, as this would shrink the storage needed for a file's block numbers considerably.

With the above, silly, example, it would shrink from 5 to 2 elements.

A file with 1000 blocks, in two runs, would shrink from 1000 to 4 elements, meaning that it could avoid using an indirect block entirely.

What is the reason that this simple optimisation was not made?

fadedbee
  • 42,671
  • 44
  • 178
  • 308
  • 1
    Likely because ext2 is a quite old and basic file system, what you're asking for sounds like 'extents', that was added in ext3 – nos Feb 25 '15 at 12:08
  • @nos can you turn that comment into an answer so that I can accept it? – fadedbee Feb 25 '15 at 12:20

0 Answers0