libext2fs: merge contiguous data blocks when writing to sparse file

Sparse IO manager allocates one block at a time. This creates many
blocks in sparse file even though most of them are contiguous. As a
result, fastboot is extremely slow writing that many blocks. Merging
contiguous blocks reduces block count and flash time significantly.

Change-Id: I211312d24d7423c7f160ee501fe8b62ddf14a847
1 file changed