<div dir="auto">+Ravi, +Raghavendra G</div><div class="gmail_extra"><br><div class="gmail_quote">On 25 Jan 2018 8:49 am, &quot;Pranith Kumar Karampuri&quot; &lt;<a href="mailto:pkarampu@redhat.com">pkarampu@redhat.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 25 Jan 2018 8:43 am, &quot;Lian, George (NSB - CN/Hangzhou)&quot; &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br type="attribution"><blockquote class="m_2557678065731641474quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I suppose the zero filled attr is for performance consider to NFS, but for fuse, it will lead issue such like hard LINK FOP,<br>
So I suggest could we add 2 attr field in the endof &quot;struct iatt {&quot;, such like ia_fuse_nlink, ia_fuse_ctime,<br>
And in function gf_zero_fill_stat , saved the ia_nlink, ia_ctime to ia_fuse_nlink,ia_fuse_ctime before set its to zero,<br>
And restore it to valued nlink and ctime in function gf_fuse_stat2attr,<br>
So that kernel could get the correct nlink and ctime.<br>
<br>
Is it a considerable solution? Any risk?<br>
<br>
Please share your comments, thanks in advance!<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Adding csaba for helping with this.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_2557678065731641474quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best Regards,<br>
George<br>
<div class="m_2557678065731641474quoted-text"><br>
-----Original Message-----<br>
From: <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>] On Behalf Of Niels de Vos<br>
Sent: Wednesday, January 24, 2018 7:43 PM<br>
To: Pranith Kumar Karampuri &lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt;<br>
</div><div class="m_2557678065731641474elided-text">Cc: Lian, George (NSB - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt;; Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<wbr>; Li, Deqian (NSB - CN/Hangzhou) &lt;<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Sun, Ping (NSB - CN/Hangzhou) &lt;<a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
Subject: Re: [Gluster-devel] a link issue maybe introduced in a bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
<br>
On Wed, Jan 24, 2018 at 02:24:06PM +0530, Pranith Kumar Karampuri wrote:<br>
&gt; hi,<br>
&gt;        In the same commit you mentioned earlier, there was this code<br>
&gt; earlier:<br>
&gt; -/* Returns 1 if the stat seems to be filled with zeroes. */ -int<br>
&gt; -nfs_zero_filled_stat (struct iatt *buf) -{<br>
&gt; -        if (!buf)<br>
&gt; -                return 1;<br>
&gt; -<br>
&gt; -        /* Do not use st_dev because it is transformed to store the xlator<br>
&gt; id<br>
&gt; -         * in place of the device number. Do not use st_ino because by<br>
&gt; this time<br>
&gt; -         * we&#39;ve already mapped the root ino to 1 so it is not guaranteed<br>
&gt; to be<br>
&gt; -         * 0.<br>
&gt; -         */<br>
&gt; -        if ((buf-&gt;ia_nlink == 0) &amp;&amp; (buf-&gt;ia_ctime == 0))<br>
&gt; -                return 1;<br>
&gt; -<br>
&gt; -        return 0;<br>
&gt; -}<br>
&gt; -<br>
&gt; -<br>
&gt;<br>
&gt; I moved this to a common library function that can be used in afr as well.<br>
&gt; Why was it there in NFS? +Niels for answering that question.<br>
<br>
Sorry, I dont know why that was done. It was introduced with the initial gNFS implementation, long before I started to work with Gluster. The only reference I have is this from<br>
xlators/nfs/server/src/nfs3-he<wbr>lpers.c:nfs3_stat_to_post_op_<wbr>attr()<br>
<br>
 371         /* Some performance translators return zero-filled stats when they<br>
 372          * do not have up-to-date attributes. Need to handle this by not<br>
 373          * returning these zeroed out attrs.<br>
 374          */<br>
<br>
This may not be true for the current situation anymore.<br>
<br>
HTH,<br>
Niels<br>
<br>
<br>
&gt;<br>
&gt; If I give you a patch which will assert the error condition, would it<br>
&gt; be possible for you to figure out the first xlator which is unwinding<br>
&gt; the iatt with nlink count as zero but ctime as non-zero?<br>
&gt;<br>
&gt; On Wed, Jan 24, 2018 at 1:03 PM, Lian, George (NSB - CN/Hangzhou) &lt;<br>
&gt; <a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi,  Pranith Kumar,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Can you tell me while need set buf-&gt;ia_nlink to “0”in function<br>
&gt; &gt; gf_zero_fill_stat(), which API or Application will care it?<br>
&gt; &gt;<br>
&gt; &gt; If I remove this line and also update corresponding in function<br>
&gt; &gt; gf_is_zero_filled_stat,<br>
&gt; &gt;<br>
&gt; &gt; The issue seems gone, but I can’t confirm will lead to other issues.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; So could you please double check it and give your comments?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; My change is as the below:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; gf_boolean_t<br>
&gt; &gt;<br>
&gt; &gt; gf_is_zero_filled_stat (struct iatt *buf)<br>
&gt; &gt;<br>
&gt; &gt; {<br>
&gt; &gt;<br>
&gt; &gt;         if (!buf)<br>
&gt; &gt;<br>
&gt; &gt;                 return 1;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;         /* Do not use st_dev because it is transformed to store the<br>
&gt; &gt; xlator id<br>
&gt; &gt;<br>
&gt; &gt;          * in place of the device number. Do not use st_ino because<br>
&gt; &gt; by this time<br>
&gt; &gt;<br>
&gt; &gt;          * we&#39;ve already mapped the root ino to 1 so it is not<br>
&gt; &gt; guaranteed to be<br>
&gt; &gt;<br>
&gt; &gt;          * 0.<br>
&gt; &gt;<br>
&gt; &gt;          */<br>
&gt; &gt;<br>
&gt; &gt; //        if ((buf-&gt;ia_nlink == 0) &amp;&amp; (buf-&gt;ia_ctime == 0))<br>
&gt; &gt;<br>
&gt; &gt;         if (buf-&gt;ia_ctime == )<br>
&gt; &gt;<br>
&gt; &gt;                 return 1;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;         return 0;<br>
&gt; &gt;<br>
&gt; &gt; }<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; void<br>
&gt; &gt;<br>
&gt; &gt; gf_zero_fill_stat (struct iatt *buf)<br>
&gt; &gt;<br>
&gt; &gt; {<br>
&gt; &gt;<br>
&gt; &gt; //       buf-&gt;ia_nlink = 0;<br>
&gt; &gt;<br>
&gt; &gt;         buf-&gt;ia_ctime = 0;<br>
&gt; &gt;<br>
&gt; &gt; }<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Thanks &amp; Best Regards<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt; *From:* Lian, George (NSB - CN/Hangzhou)<br>
&gt; &gt; *Sent:* Friday, January 19, 2018 10:03 AM<br>
&gt; &gt; *To:* Pranith Kumar Karampuri &lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt;; Zhou, Cynthia<br>
&gt; &gt; (NSB -<br>
&gt; &gt; CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Cc:* Li, Deqian (NSB - CN/Hangzhou) &lt;<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;;<br>
&gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Sun, Ping (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt; *Subject:* RE: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; &gt;&gt;&gt; Cool, this works for me too. Send me a mail off-list once you<br>
&gt; &gt; &gt;&gt;&gt; are<br>
&gt; &gt; available and we can figure out a way to get into a call and work on this.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Have you reproduced the issue per the step I listed in<br>
&gt; &gt; <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1531457" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1531457</a> and last mail?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; If not, I would like you could try it yourself , which the<br>
&gt; &gt; difference between yours and mine is just create only 2 bricks instead of 6 bricks.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; And Cynthia could have a session with you if you needed when I am<br>
&gt; &gt; not available in next Monday and Tuesday.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *From:* <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a><br>
&gt; &gt; [mailto:<a href="mailto:gluster-devel-bounces@" target="_blank">gluster-devel-bounces@</a> <a href="http://gluster.org" rel="noreferrer" target="_blank">gluster.org</a><br>
&gt; &gt; &lt;<a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster<wbr>.org</a>&gt;] *On Behalf Of *Pranith Kumar<br>
&gt; &gt; Karampuri<br>
&gt; &gt; *Sent:* Thursday, January 18, 2018 6:03 PM<br>
&gt; &gt; *To:* Lian, George (NSB - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Cc:* Zhou, Cynthia (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<wbr>; Li, Deqian (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Sun, Ping<br>
&gt; &gt; (NSB - CN/Hangzhou) &lt; <a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Subject:* Re: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Jan 18, 2018 at 12:17 PM, Lian, George (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; &gt;&gt;&gt;I actually tried it with replica-2 and replica-3 and then<br>
&gt; &gt; &gt;&gt;&gt;distributed<br>
&gt; &gt; replica-2 before replying to the earlier mail. We can have a<br>
&gt; &gt; debugging session if you are okay with it.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; It is fine if you can’t reproduce the issue in your ENV.<br>
&gt; &gt;<br>
&gt; &gt; And I has attached the detail reproduce log in the Bugzilla FYI<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; But I am sorry I maybe OOO at Monday and Tuesday next week, so debug<br>
&gt; &gt; session will be fine to me at next Wednesday.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Cool, this works for me too. Send me a mail off-list once you are<br>
&gt; &gt; available and we can figure out a way to get into a call and work on this.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Paste the detail reproduce log FYI here:<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# gluster peer probe ubuntu*<br>
&gt; &gt;<br>
&gt; &gt; *peer probe: success. Probe on localhost not needed*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# gluster v create test replica 2 ubuntu:/home/gfs/b1<br>
&gt; &gt; ubuntu:/home/gfs/b2 force*<br>
&gt; &gt;<br>
&gt; &gt; *volume create: test: success: please start the volume to access<br>
&gt; &gt; data*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# gluster v start test*<br>
&gt; &gt;<br>
&gt; &gt; *volume start: test: success*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# gluster v info test*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *Volume Name: test*<br>
&gt; &gt;<br>
&gt; &gt; *Type: Replicate*<br>
&gt; &gt;<br>
&gt; &gt; *Volume ID: fef5fca3-81d9-46d3-8847-74cde6<wbr>f701a5*<br>
&gt; &gt;<br>
&gt; &gt; *Status: Started*<br>
&gt; &gt;<br>
&gt; &gt; *Snapshot Count: 0*<br>
&gt; &gt;<br>
&gt; &gt; *Number of Bricks: 1 x 2 = 2*<br>
&gt; &gt;<br>
&gt; &gt; *Transport-type: tcp*<br>
&gt; &gt;<br>
&gt; &gt; *Bricks:*<br>
&gt; &gt;<br>
&gt; &gt; *Brick1: ubuntu:/home/gfs/b1*<br>
&gt; &gt;<br>
&gt; &gt; *Brick2: ubuntu:/home/gfs/b2*<br>
&gt; &gt;<br>
&gt; &gt; *Options Reconfigured:*<br>
&gt; &gt;<br>
&gt; &gt; *transport.address-family: inet*<br>
&gt; &gt;<br>
&gt; &gt; *nfs.disable: on*<br>
&gt; &gt;<br>
&gt; &gt; *performance.client-io-threads<wbr>: off*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# gluster v status*<br>
&gt; &gt;<br>
&gt; &gt; *Status of volume: test*<br>
&gt; &gt;<br>
&gt; &gt; *Gluster process                             TCP Port  RDMA Port  Online<br>
&gt; &gt; Pid*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *-----------------------------<wbr>------------------------------<wbr>--------<br>
&gt; &gt; -----------*<br>
&gt; &gt;<br>
&gt; &gt; *Brick ubuntu:/home/gfs/b1                   49152     0          Y<br>
&gt; &gt; 7798*<br>
&gt; &gt;<br>
&gt; &gt; *Brick ubuntu:/home/gfs/b2                   49153     0          Y<br>
&gt; &gt; 7818*<br>
&gt; &gt;<br>
&gt; &gt; *Self-heal Daemon on localhost               N/A       N/A        Y<br>
&gt; &gt; 7839*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *Task Status of Volume test*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *-----------------------------<wbr>------------------------------<wbr>--------<br>
&gt; &gt; -----------*<br>
&gt; &gt;<br>
&gt; &gt; *There are no active volume tasks*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# gluster v set test cluster.consistent-metadata on*<br>
&gt; &gt;<br>
&gt; &gt; *volume set: success*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# ls /mnt/test*<br>
&gt; &gt;<br>
&gt; &gt; *ls: cannot access &#39;/mnt/test&#39;: No such file or directory*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# mkdir -p /mnt/test*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# mount -t glusterfs ubuntu:/test /mnt/test*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:~# cd /mnt/test*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:/mnt/test# echo &quot;abc&quot;&gt;aaa*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:/mnt/test# cp aaa bbb;link bbb ccc*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:/mnt/test# kill -9 7818*<br>
&gt; &gt;<br>
&gt; &gt; *root@ubuntu:/mnt/test# cp aaa ddd;link ddd eee*<br>
&gt; &gt;<br>
&gt; &gt; *link: cannot create link &#39;eee&#39; to &#39;ddd&#39;: No such file or directory*<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *From:* <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a><br>
&gt; &gt; [mailto:<a href="mailto:gluster-devel-bounces@" target="_blank">gluster-devel-bounces@</a> <a href="http://gluster.org" rel="noreferrer" target="_blank">gluster.org</a>] *On Behalf Of *Pranith<br>
&gt; &gt; Kumar Karampuri<br>
&gt; &gt; *Sent:* Thursday, January 18, 2018 2:40 PM<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *To:* Lian, George (NSB - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Cc:* Zhou, Cynthia (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<wbr>; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Li,<br>
&gt; &gt; Deqian (NSB - CN/Hangzhou) &lt; <a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;; Sun, Ping<br>
&gt; &gt; (NSB - CN/Hangzhou) &lt; <a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Subject:* Re: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Jan 18, 2018 at 6:33 AM, Lian, George (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; I suppose the brick numbers in your testing is six, and you just<br>
&gt; &gt; shut down the 3 process.<br>
&gt; &gt;<br>
&gt; &gt; When I reproduce the issue, I only create a replicate volume with 2<br>
&gt; &gt; bricks, only let ONE brick working and set<br>
&gt; &gt; cluster.consistent-metadata on,<br>
&gt; &gt;<br>
&gt; &gt; With this 2 test condition, the issue could 100% reproducible.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt;       I actually tried it with replica-2 and replica-3 and then<br>
&gt; &gt; distributed replica-2 before replying to the earlier mail. We can<br>
&gt; &gt; have a debugging session if you are okay with it.<br>
&gt; &gt;<br>
&gt; &gt; I am in the middle of a customer issue myself(That is the reason for<br>
&gt; &gt; this delay :-( ) and thinking of wrapping it up early next week.<br>
&gt; &gt; Would that be fine with you?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; 16:44:28 :) ⚡ gluster v status<br>
&gt; &gt;<br>
&gt; &gt; Status of volume: r2<br>
&gt; &gt;<br>
&gt; &gt; Gluster process                             TCP Port  RDMA Port  Online<br>
&gt; &gt; Pid<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------<wbr>------------------------------<br>
&gt; &gt; ------------------<br>
&gt; &gt;<br>
&gt; &gt; Brick localhost.localdomain:/home/gf<wbr>s/r2_0  49152     0          Y<br>
&gt; &gt; 5309<br>
&gt; &gt;<br>
&gt; &gt; Brick localhost.localdomain:/home/gf<wbr>s/r2_1  49154     0          Y<br>
&gt; &gt; 5330<br>
&gt; &gt;<br>
&gt; &gt; Brick localhost.localdomain:/home/gf<wbr>s/r2_2  49156     0          Y<br>
&gt; &gt; 5351<br>
&gt; &gt;<br>
&gt; &gt; Brick localhost.localdomain:/home/gf<wbr>s/r2_3  49158     0          Y<br>
&gt; &gt; 5372<br>
&gt; &gt;<br>
&gt; &gt; Brick localhost.localdomain:/home/gf<wbr>s/r2_4  49159     0          Y<br>
&gt; &gt; 5393<br>
&gt; &gt;<br>
&gt; &gt; Brick localhost.localdomain:/home/gf<wbr>s/r2_5  49160     0          Y<br>
&gt; &gt; 5414<br>
&gt; &gt;<br>
&gt; &gt; Self-heal Daemon on localhost               N/A       N/A        Y<br>
&gt; &gt; 5436<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Task Status of Volume r2<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------<wbr>------------------------------<br>
&gt; &gt; ------------------<br>
&gt; &gt;<br>
&gt; &gt; There are no active volume tasks<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; root@dhcp35-190 - ~<br>
&gt; &gt;<br>
&gt; &gt; 16:44:38 :) ⚡ kill -9 5309 5351 5393<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt; *From:* <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a><br>
&gt; &gt; [mailto:<a href="mailto:gluster-devel-bounces@" target="_blank">gluster-devel-bounces@</a> <a href="http://gluster.org" rel="noreferrer" target="_blank">gluster.org</a>] *On Behalf Of *Pranith<br>
&gt; &gt; Kumar Karampuri<br>
&gt; &gt; *Sent:* Wednesday, January 17, 2018 7:27 PM<br>
&gt; &gt; *To:* Lian, George (NSB - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Cc:* Li, Deqian (NSB - CN/Hangzhou) &lt;<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;;<br>
&gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;; Sun, Ping (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *Subject:* Re: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Mon, Jan 15, 2018 at 1:55 PM, Pranith Kumar Karampuri &lt;<br>
&gt; &gt; <a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Mon, Jan 15, 2018 at 8:46 AM, Lian, George (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Have you reproduced this issue? If yes, could you please confirm<br>
&gt; &gt; whether it is an issue or not?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt;        I tried recreating this on my laptop and on both master and<br>
&gt; &gt; 3.12 and I am not able to recreate the issue :-(.<br>
&gt; &gt;<br>
&gt; &gt; Here is the execution log: <a href="https://paste.fedoraproject.org/paste/-" rel="noreferrer" target="_blank">https://paste.fedoraproject.or<wbr>g/paste/-</a><br>
&gt; &gt; csXUKrwsbrZAVW1KzggQQ<br>
&gt; &gt;<br>
&gt; &gt; Since I was doing this on my laptop, I changed shutting down of the<br>
&gt; &gt; replica to killing the brick process to simulate this test.<br>
&gt; &gt;<br>
&gt; &gt; Let me know if I missed something.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Sorry, I am held up with some issue at work, so I think I will get<br>
&gt; &gt; some time day after tomorrow to look at this. In the mean time I am<br>
&gt; &gt; adding more people who know about afr to see if they get a chance to<br>
&gt; &gt; work on this before me.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; And if it is an issue,  do you have any solution for this issue?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *From:* Lian, George (NSB - CN/Hangzhou)<br>
&gt; &gt; *Sent:* Thursday, January 11, 2018 2:01 PM<br>
&gt; &gt; *To:* Pranith Kumar Karampuri &lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt;<br>
&gt; &gt; *Cc:* Zhou, Cynthia (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<wbr>; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Li,<br>
&gt; &gt; Deqian (NSB - CN/Hangzhou) &lt; <a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;; Sun, Ping<br>
&gt; &gt; (NSB - CN/Hangzhou) &lt; <a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Subject:* RE: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Please see detail test step on <a href="https://bugzilla.redhat.com/" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/</a><br>
&gt; &gt; show_bug.cgi?id=1531457<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; How reproducible:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Steps to Reproduce:<br>
&gt; &gt;<br>
&gt; &gt; 1.create a volume name &quot;test&quot; with replicated<br>
&gt; &gt;<br>
&gt; &gt; 2.set volume option cluster.consistent-metadata with on:<br>
&gt; &gt;<br>
&gt; &gt;   gluster v set test cluster.consistent-metadata on<br>
&gt; &gt;<br>
&gt; &gt; 3. mount volume test on client on /mnt/test<br>
&gt; &gt;<br>
&gt; &gt; 4. create a file aaa size more than 1 byte<br>
&gt; &gt;<br>
&gt; &gt;    echo &quot;1234567890&quot; &gt;/mnt/test/aaa<br>
&gt; &gt;<br>
&gt; &gt; 5. shutdown a replicat node, let&#39;s say sn-1, only let sn-0 worked<br>
&gt; &gt;<br>
&gt; &gt; 6. cp /mnt/test/aaa /mnt/test/bbb; link /mnt/test/bbb /mnt/test/ccc<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; BRs<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *From:* <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a><br>
&gt; &gt; [mailto:<a href="mailto:gluster-devel-bounces@" target="_blank">gluster-devel-bounces@</a> <a href="http://gluster.org" rel="noreferrer" target="_blank">gluster.org</a><br>
&gt; &gt; &lt;<a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster<wbr>.org</a>&gt;] *On Behalf Of *Pranith Kumar<br>
&gt; &gt; Karampuri<br>
&gt; &gt; *Sent:* Thursday, January 11, 2018 12:39 PM<br>
&gt; &gt; *To:* Lian, George (NSB - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Cc:* Zhou, Cynthia (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<wbr>; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Li,<br>
&gt; &gt; Deqian (NSB - CN/Hangzhou) &lt; <a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;; Sun, Ping<br>
&gt; &gt; (NSB - CN/Hangzhou) &lt; <a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Subject:* Re: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Jan 11, 2018 at 6:35 AM, Lian, George (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; &gt;&gt;&gt; In which protocol are you seeing this issue? Fuse/NFS/SMB?<br>
&gt; &gt;<br>
&gt; &gt; It is fuse, within mountpoint by “mount -t glusterfs  …“ command.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Could you let me know the test you did so that I can try to<br>
&gt; &gt; re-create and see what exactly is going on?<br>
&gt; &gt;<br>
&gt; &gt; Configuration of the volume and the steps to re-create the issue you<br>
&gt; &gt; are seeing would be helpful in debugging the issue further.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; *From:* <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a><br>
&gt; &gt; [mailto:<a href="mailto:gluster-devel-bounces@" target="_blank">gluster-devel-bounces@</a> <a href="http://gluster.org" rel="noreferrer" target="_blank">gluster.org</a>] *On Behalf Of *Pranith<br>
&gt; &gt; Kumar Karampuri<br>
&gt; &gt; *Sent:* Wednesday, January 10, 2018 8:08 PM<br>
&gt; &gt; *To:* Lian, George (NSB - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Cc:* Zhou, Cynthia (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<wbr>; Zhong, Hua (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:hua.zhong@nokia-sbell.com" target="_blank">hua.zhong@nokia-sbell.com</a>&gt;; Li, Deqian (NSB - CN/Hangzhou)<br>
&gt; &gt; &lt;<a href="mailto:deqian.li@nokia-sbell.com" target="_blank">deqian.li@nokia-sbell.com</a>&gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Sun, Ping<br>
&gt; &gt; (NSB - CN/Hangzhou) &lt;<a href="mailto:ping.sun@nokia-sbell.com" target="_blank">ping.sun@nokia-sbell.com</a>&gt;<br>
&gt; &gt; *Subject:* Re: [Gluster-devel] a link issue maybe introduced in a<br>
&gt; &gt; bug fix &quot; Don&#39;t let NFS cache stat after writes&quot;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Jan 10, 2018 at 11:09 AM, Lian, George (NSB - CN/Hangzhou) &lt;<br>
&gt; &gt; <a href="mailto:george.lian@nokia-sbell.com" target="_blank">george.lian@nokia-sbell.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; Hi, Pranith Kumar,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; I has create a bug on Bugzilla <a href="https://bugzilla.redhat.com/" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/</a><br>
&gt; &gt; show_bug.cgi?id=1531457<br>
&gt; &gt;<br>
&gt; &gt; After my investigation for this link issue, I suppose your changes<br>
&gt; &gt; on afr-dir-write.c with issue &quot; Don&#39;t let NFS cache stat after<br>
&gt; &gt; writes&quot; , your fix is like:<br>
&gt; &gt;<br>
&gt; &gt; ------------------------------<wbr>--------<br>
&gt; &gt;<br>
&gt; &gt;        if (afr_txn_nothing_failed (frame, this)) {<br>
&gt; &gt;<br>
&gt; &gt;                         /*if it did pre-op, it will do post-op<br>
&gt; &gt; changing ctime*/<br>
&gt; &gt;<br>
&gt; &gt;                         if (priv-&gt;consistent_metadata &amp;&amp;<br>
&gt; &gt;<br>
&gt; &gt;                             afr_needs_changelog_update (local))<br>
&gt; &gt;<br>
&gt; &gt;                                 afr_zero_fill_stat (local);<br>
&gt; &gt;<br>
&gt; &gt;                         local-&gt;transaction.unwind (frame, this);<br>
&gt; &gt;<br>
&gt; &gt;                 }<br>
&gt; &gt;<br>
&gt; &gt; In the above fix, it set the ia_nlink to ‘0’ if option<br>
&gt; &gt; consistent-metadata is set to “on”.<br>
&gt; &gt;<br>
&gt; &gt; And hard link a file with which just created will lead to an error,<br>
&gt; &gt; and the error is caused in kernel function “vfs_link”:<br>
&gt; &gt;<br>
&gt; &gt; if (inode-&gt;i_nlink == 0 &amp;&amp; !(inode-&gt;i_state &amp; I_LINKABLE))<br>
&gt; &gt;<br>
&gt; &gt;              error =  -ENOENT;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; could you please have a check and give some comments here?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; When stat is &quot;zero filled&quot;, understanding is that the higher layer<br>
&gt; &gt; protocol doesn&#39;t send stat value to the kernel and a separate lookup<br>
&gt; &gt; is sent by the kernel to get the latest stat value. In which<br>
&gt; &gt; protocol are you seeing this issue? Fuse/NFS/SMB?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt;<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Pranith<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Pranith<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Pranith<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Pranith<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Pranith<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt;<br>
&gt; &gt; Pranith<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Pranith<br>
</div><div class="m_2557678065731641474elided-text">______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/mailm<wbr>an/listinfo/gluster-devel</a><br>
</div></blockquote></div><br></div></div></div>
</blockquote></div></div>