<br><br><div class="gmail_quote">On Sun, Jul 17, 2011 at 5:43 PM, Emmanuel Dreyfus <span dir="ltr">&lt;<a href="mailto:manu@netbsd.org">manu@netbsd.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Emmanuel Dreyfus &lt;<a href="mailto:manu@netbsd.org">manu@netbsd.org</a>&gt; wrote:<br>
<br>
</div><div class="im">&gt; The sin is therefore to set FATTR_ATIME | FATTR_MTIME, while glusterfs<br>
&gt; assumes this is a ftruncate() calls because only FATTR_SIZE is set. Am I<br>
&gt; correct?<br>
<br>
</div>I &quot;fixed&quot; NetBSD FUSE so that FATTR_ATIME | FATTR_MTIME are removed when<br>
FATTR_SIZE is set but not FATTR_UID, FATTR_GID and FATTR_MODE. It seems<br>
to work.</blockquote><div><br></div><div>This only seems like a fix of the symptom. Even if FATTR_ATIME | FATTR_MTIME were set along with FATTR_SIZE, the entire setattr should not have had an effect on the ordering of ftruncate w.r.t the other writes. I believe that the issue can show up if you were to load io-threads and write-behind right below fuse. You need synchronization within your FUSE port to make sure further writes are not sent up (or truncate() syscall not returned) till the FUSE filesystem completes the setattr call.</div>
<div><br></div><div>Avati</div></div>