<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 11, 2018 at 6:35 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="blue" vlink="purple" lang="ZH-CN">
<div class="m_-2988481113366034027WordSection1">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Hi,<u></u><u></u></span></p><span class="">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">>>></span><span lang="EN-US"> In which protocol are you seeing this issue? Fuse/NFS/SMB?</span><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u><u></u></span></p>
</span><p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">It is fuse, within mountpoint by
</span><span style="font-size:10.5pt;font-family:DengXian">“<span lang="EN-US">mount -t glusterfs</span></span><span style="font-size:10.5pt" lang="EN-US"> </span><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">
</span><span style="font-size:10.5pt;font-family:DengXian">…“<span lang="EN-US"> command.</span></span></p></div></div></blockquote><div><br></div><div>Could you let me know the test you did so that I can try to re-create and see what exactly is going on?</div><div>Configuration of the volume and the steps to re-create the issue you are seeing would be helpful in debugging the issue further.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="ZH-CN"><div class="m_-2988481113366034027WordSection1"><p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian"><span lang="EN-US"><u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Thanks & Best Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">George<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a> [mailto:<a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@<wbr>gluster.org</a>]
<b>On Behalf Of </b>Pranith Kumar Karampuri<span class=""><br>
<b>Sent:</b> Wednesday, January 10, 2018 8:08 PM<br>
<b>To:</b> Lian, George (NSB - CN/Hangzhou) <<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>><br>
<b>Cc:</b> Zhou, Cynthia (NSB - CN/Hangzhou) <<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>><wbr>; Zhong, Hua (NSB - CN/Hangzhou) <<a href="mailto:hua.zhong@nokia-sbell.com" target="_blank">hua.zhong@nokia-sbell.com</a>>; Li, Deqian (NSB - CN/Hangzhou) <<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>>; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Sun, Ping (NSB - CN/Hangzhou) <<a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>><br>
</span><b>Subject:</b> Re: [Gluster-devel] a link issue maybe introduced in a bug fix " Don't let NFS cache stat after writes"<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">On Wed, Jan 10, 2018 at 11:09 AM, Lian, George (NSB - CN/Hangzhou) <<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>> wrote:<u></u><u></u></span></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<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"><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
</span>‘<span lang="EN-US">0</span>’<span lang="EN-US"> if option consistent-metadata is set to
</span>“<span lang="EN-US">on</span>”<span lang="EN-US">.<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
</span>“<span lang="EN-US">vfs_link</span>”<span lang="EN-US">:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">if (inode->i_nlink == 0 && !(inode->i_state & I_LINKABLE))</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US"> error = -ENOENT;</span><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">could you please have a check and give some comments here?<u></u><u></u></span></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">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?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<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>
<p class="MsoNormal"><span lang="EN-US"><br>
<br clear="all">
<br>
-- <u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Pranith<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div></div></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>