Are you sure that a truncated file will re-use the same truncated blocks,
but not the preallocated ones? I can imagine not re-using all of the data
blocks within a single transaction, but it would be odd if the preallocated
blocks are treated differently.
How have you done the ext3 preallocation code? One way to do it would be
to only mark the blocks as used in the in-memory copy of the block bitmap
and not write that to disk (we keep 2 copies of the block bitmap, IIRC).
That way you don't need to do anything fancy at recovery time.
Did you ever benchmark ext2 with and without preallocation to see if it
made any difference? No point in doing extra work if there is no benefit.
Cheers, Andreas
-- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/