<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 10, 2018 at 11:09 AM, Lian, George (NSB - CN/Hangzhou) <span dir="ltr"><<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="ZH-CN">
<div class="m_-6264152623745370811WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi, Pranith Kumar,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I has create a bug on Bugzilla <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1531457" target="_blank">
https://bugzilla.redhat.com/<wbr>show_bug.cgi?id=1531457</a><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">After my investigation for this link issue, I suppose your changes on afr-dir-write.c with issue " Don't let NFS cache stat after writes" , your fix is like:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">------------------------------<wbr>--------<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> if (afr_txn_nothing_failed (frame, this)) {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> /*if it did pre-op, it will do post-op changing ctime*/<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> if (priv->consistent_metadata &&<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> afr_needs_changelog_update (local))<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> afr_<wbr>zero_fill_stat (local);<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> local->transaction.unwind (frame, this);<u></u><u></u></span></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><span lang="EN-US"> }<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US">In the above fix, it set the ia_nlink to ‘0’ if option consistent-metadata is set to “on”.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">And hard link a file with which just created will lead to an error, and the error is caused in kernel function “vfs_link”:<u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span style="font-size:12.0pt;font-family:"Courier New";color:black" lang="EN-US">if (inode->i_nlink == 0 && !(inode->i_state & I_LINKABLE))<u></u><u></u></span></p>
<p class="MsoNormal" style="text-align:left" align="left"><span style="font-size:12.0pt;font-family:"Courier New";color:black" lang="EN-US"> error = -ENOENT;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">could you please have a check and give some comments here?</span></p></div></div></blockquote><div><br></div><div>When stat is "zero filled", understanding is that the higher layer protocol doesn't send stat value to the kernel and a separate lookup is sent by the kernel to get the latest stat value. In which protocol are you seeing this issue? Fuse/NFS/SMB?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="ZH-CN"><div class="m_-6264152623745370811WordSection1"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks & Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">George<u></u><u></u></span></p>
</div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Pranith<br></div></div>
</div></div>