Re: XFS: how to NOT null files on fsck?

Chris Wedgwood
2004-07-13T22:54:49Z

On Wed, Jul 14, 2004 at 12:24:11AM +0200, Helge Hafting wrote:

> There is another solution - zero blocks when freeing them.

slow

> (Or put them on a list for later zeroing when the fs isn't busy, in
> order to kee??????p good performance)

complicated, doesn't buy as anything, it also means the blocks are
tied up whilst they are being zeroed (consider a truncated on a
multi-gb file, fairly common)

> With this approach you don't need to zero a half-written
> block after a crash, which means you destroy less data.

it doesn't zero after a crash, what happens is the blocks never make
it to disk and the metadata (which did make it to disk) reflects this
so read returns nulls

as is, you can truncate a multi-gb file, write over it and the only IO
you see will be the new data being written out, zeroing in between
would be horribly pianful

--cw