<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 15, 2018 at 8:46 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_500526784010738317WordSection1">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Hi,<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"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Have you reproduced this issue? If yes, could you please confirm whether it is an issue or not?</span></p></div></div></blockquote><div><br></div><div>Sorry, I am held up with some issue at work, so I think I will get some time day after tomorrow to look at this. In the mean time I am adding more people who know about afr to see if they get a chance to work on this before me.<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_500526784010738317WordSection1"><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"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">And if it is an issue, do you have any solution for this issue?<u></u><u></u></span></p><span class="">
<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>
</span><div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<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"> Lian, George (NSB - CN/Hangzhou)
<br>
<b>Sent:</b> Thursday, January 11, 2018 2:01 PM<br>
<b>To:</b> Pranith Kumar Karampuri <<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>><span class=""><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>; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Li, Deqian (NSB - CN/Hangzhou) <<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</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><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Hi,<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"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Please see detail test step on
<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 style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">How reproducible:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">Steps to Reproduce:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">1.create a volume name "test" with replicated
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">2.set volume option cluster.consistent-metadata with on:
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US"> gluster v set test cluster.consistent-metadata on<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">3. mount volume test on client on /mnt/test<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">4. create a file aaa size more than 1 byte<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US"> echo "1234567890" >/mnt/test/aaa<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">5. shutdown a replicat node, let's say sn-1, only let sn-0 worked<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black" lang="EN-US">6. cp /mnt/test/aaa /mnt/test/bbb; link /mnt/test/bbb /mnt/test/ccc<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"><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">BRs<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> [<a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">mailto:gluster-devel-bounces@<wbr>gluster.org</a>]
<b>On Behalf Of </b>Pranith Kumar Karampuri<br>
<b>Sent:</b> Thursday, January 11, 2018 12:39 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>;
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Li, Deqian (NSB - CN/Hangzhou) <<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>>; Sun, Ping (NSB - CN/Hangzhou) <<a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>><br>
<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>
<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 Thu, Jan 11, 2018 at 6:35 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 style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Hi,</span><span lang="EN-US"><u></u><u></u></span></p>
<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?<u></u><u></u></span></p>
<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><span lang="EN-US"><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">Could you let me know the test you did so that I can try to re-create and see what exactly is going on?<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Configuration of the volume and the steps to re-create the issue you are seeing would be helpful in debugging the issue further.<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 style="font-size:10.5pt" lang="EN-US"> </span><span 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,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">George</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt" lang="EN-US"> </span><span 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<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>
<b>Subject:</b> Re: [Gluster-devel] a link issue maybe introduced in a bug fix " Don't let NFS cache stat after writes"</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<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"> <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>
<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>