You should talk to Stephen Tweedie about this. I've talked to
him on this subject, and he's had plans to do something very much like
this. One of his ideas was that even without making a file format
change, you could have an in-memory cache which stored the block
locations of the inode in terms of block-runs. This would allow the
ext2 filesystem to access files without needing to mess with the
indirect blocks, and you'd get a performance win even without changing
the on-disk format.
Of course, for the ultimate in performance gain, you would have
to change the on-disk format, and the way to do this compatibly would be
to use an ext2 inode flag to designate whether an inode is using the old
format or the new format. As you noted, for sparse files, for obvious
reasons the old format is superior.
In fact, for a first-cut implementation, it might make sense to
make a kernel which only creates files in the new format assuming that
the entries all fit in i_blocks, and immediately converts things to the
old format once that assumption is violated.
- Ted