Re: XFS: how to NOT null files on fsck?
From: H. Peter Anvin
Date: Mon Jul 12 2004 - 13:03:20 EST
Followup to: <20040711215446.GA21443@xxxxxxxxxxxxxx>
By author: Helge Hafting <helgehaf@xxxxxxxxxxxxx>
In newsgroup: linux.dev.kernel
> >
> No, it doesn't.
>
> close() will flush the C library buffer. That means the data
> moves from theose buffers to the pagacache. The program crashing
> after that will have no effect on the file. It can still
> be lost if the _kernel_ crashes though.
> If you want the pagecache flushed to disk, use fsync (or sync)
>
No it won't, since if you're using file descriptors there *is* no C
library buffer. fclose() will, though, and then call close().
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/