This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] ldconfig: Call fsync on temporary files before renaming them [BZ #20890]
- From: Christoph Hellwig <hch at lst dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 12 Jan 2018 12:37:48 +0100
- Subject: Re: [PATCH] ldconfig: Call fsync on temporary files before renaming them [BZ #20890]
- Authentication-results: sourceware.org; auth=none
- References: <20180112110757.D4D2440172552@oldenburg.str.redhat.com>
On Fri, Jan 12, 2018 at 12:07:57PM +0100, Florian Weimer wrote:
> If the system crashes before the file data has been written to disk, the
> file system recovery upon the next mount may restore a partially
> rewritten temporary file under the non-temporary (final) name (after the
> rename operation).
>
> Some file systems perform an implicit fsync before renaming a file over
> another one, but XFS does not, for example.
At least on Linux no file system performs an actual fsync equivalent.
A few do start a writeout, but don't actually wait on it.