"Patrick J. LoPresti" wrote:
> Russell Cattelan <cattelan@xxxxxxxxxxx> writes:
>
> > XFS uses delayed allocation / delayed write by default any data
> > written immediacy before a crash probably won't be on disk, this is
> > known behavior and isn't considered a bug, it's a trade off.
>
> Is this true even if I call fsync() or fdatasync() on the file?
>
> I am wondering about this because some applications (e.g., qmail)
> create a temp file, call fsync() to flush it to stable storage, use
> rename() to "commit" the file to its final home.
>
> With XFS, is this a reliable way to update a file on disk, or not?
Yes that is exactly what an application should do to ensure the
data has been written to disk.
>
>
> - Pat
--
Russell Cattelan
cattelan@xxxxxxxxxxx
|