On Wed, Feb 13, 2019 at 04:39:15PM +0000, Sage Weil wrote: > On Wed, 13 Feb 2019, Dan van der Ster wrote: > > On Wed, Feb 13, 2019 at 5:32 PM Brett Niver <bniver@xxxxxxxxxx> wrote: > > > > > > point of my question - similar to many other async error reporting > > > systems - you need to do another fsync -after- you've written > > > bufferedIO and done the initial fsync that you hope worked, to find > > > out if it actually worked. > > > right? > > You only need one fsync(2) after you've doing your buffers writes to > ensure the writes are stable and discover any errors. A second fsync(2) > call will be a no-op unless more new data was written. Not sure why everyone talks about buffered I/O here - the exact same is true for direct I/O.