<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 8, 2017 at 5:29 PM, Lindsay Mathieson <span dir="ltr">&lt;<a href="mailto:lindsay.mathieson@gmail.com" target="_blank">lindsay.mathieson@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 8/01/2017 10:38 AM, Lindsay Mathieson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Option: performance.flush-behind<br>
Default Value: on<br>
Description: If this option is set ON, instructs write-behind translator to perform flush in background, by returning success (or any errors, if any of previous  writes were failed) to application even before flush FOP is sent to backend filesystem.<br>
<br>
<br>
Does this mean that essentially fsync is disabled by default?<br>
<br>
</blockquote>
<br></span>
Also:<br>
<br>
performance.write-behind : on<br>
performance.strict-o-direct : off<br>
<br>
<br>
It would appear that by default, fsync and O_DIRECT are off, and write-behind is on<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Note that flush-behind does not alter the behavior of fsync() operations. fsync() in gluster by default is synchronous and returns only when all necessary fsync() operation(s) are complete in the brick(s). flush-behind being on would mean that a sequence of:</div><div><br></div><div>open() + write() + close() does not guarantee written data to be on disk.</div><div><br></div><div>However the following sequence guarantees that (with flush-behind being enabled or disabled) written data will be on disk:</div><div><br></div><div>open() + write() + fsync() + close().</div><div><br></div><div>As long as applications perform fsync() or open with O_SYNC, data that is written will be guaranteed to be on disk.</div><div><br></div><div>strict-o-direct is set to off by default to avoid confusions that have been around with O_DIRECT and documented in the NOTES section of man 2 open. write-behind is enabled by default and it honors O_SYNC/fsync() for syncing previously acknowledged write(s) to disk.</div><div><br></div><div>Regards,</div><div>Vijay</div><div><br></div></div></div></div>