On Thu, May 3, 2018 at 3:30 PM, Niklas Hambüchen <mail@xxxxxx> wrote: > Hello, > > here's a simple question > I'm having trouble finding answers to that is > probably trivial to answer for file system developers. > Not trivial :) Are you asking the question without being aware of all the discussions that led to this patch https://lkml.org/lkml/2018/4/23/994 > Does a sequence of close()/re-open()/fsync() provide the same durability > guarantees as fsync()/close()? The short answer is no, the latter provides a better guaranty. The longer answer is that durability guarantees depends on kernel version, because situation has been changing in v4.13, v4.14 and now again in v4.17-rc and stable kernels. > > http://pubs.opengroup.org/onlinepubs/009695399/functions/fsync.html > specifies that > > "The fsync() function shall request that all data for the open file > descriptor named by fildes is to be transferred to the storage device" > > which seems to restrict the statement to "for the open file descriptor", > possibly suggesting that close()/open()/fsync() may not have the desired > effect. > > Being able to link to an authorative answer would be very appreciated. > Sadly, there is no documentation at the level that you desire. Thanks, Amir.