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

Chris Wedgwood
2004-07-12T23:14:30Z

On Tue, Jul 13, 2004 at 01:03:04AM +0200, Bernd Eckenfels wrote:

> open("test.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3

old data blocks release (truncated), transaction for this written to
journal more-or-less synchronously

> write(3, "test\ntest\n", 10) = 10
> close(3) = 0

new data sitting in page-cache, not written to disk (in the case of
XFS the new blocks probably aren't even allocted at this stage). the
file size being extended is i assume recorded in the journal though.

if you crash now, you see nulls or a truncated file, i think this is
what people are getting with dotfiles

KDE is especially good at triggering this it seems

--cw