Ts'o: Delayed allocation and the zero-length file problem
Ts'o: Delayed allocation and the zero-length file problem
Posted Mar 16, 2009 16:50 UTC (Mon) by masoncl (subscriber, #47138)In reply to: Ts'o: Delayed allocation and the zero-length file problem by njs
Parent article: Ts'o: Delayed allocation and the zero-length file problem
This means the transaction commit doesn't have to wait for the data blocks because the metadata for the file extents always reflects extents that are actually on disk.
When you rename one file over another, the destination file is atomically replaced with the new file. The new file is fully consistent with the data that has already been written, which in the worst case means it has a size of zero after a crash.
I hope that made some kind of sense. At any rate, 2.6.30 will have patches that make the rename case work similar to the way ext3 does today. Files that have been through rename will get flushed before the commit is finalized (+/- some optimizations to skip it for destination files that were from the current transaction).
