bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#322457: coding this


From: Paul Eggert
Subject: Re: Bug#322457: coding this
Date: Fri, 29 Jun 2007 13:29:08 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Russell Coker <address@hidden> wrote:

> Probably the first step towards this goal would be to look at how to have cp,
> mv, etc all take advantage of copying to a temporary file that would be
> synchronised with fsync() before being renamed.  Also it would be good to
> have an option to call fsync() before close().  Sometimes you merely want to
> know that the data is committed to disk before the program returns.

These both sound like nice additions, but I'd guess the fsync option
should be independent from the tempfile+rename option.  The original
request was only about tempfile+rename.

My vague impression is that fsync will make things run considerably
slower on many implementations, and it won't help the original
requester at all.  tempfile+rename fixes the problem that the original
request was about.  Probably part of the confusion here is due to the
choice of the name "--atomic" to mean tempfile+rename; in some sense
rename is atomic, but it's not the same sense that fsync is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]