<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 3, 2016 at 1:10 PM, Raghavendra G <span dir="ltr">&lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Nov 3, 2016 at 10:27 AM, Raghavendra G <span dir="ltr">&lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_3297952592040684392gmail-">On Thu, Nov 3, 2016 at 7:16 AM, Lian, George (Nokia - CN/Hangzhou) <span dir="ltr">&lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>&gt;Yes. I was assuming that the previous results were tested with:<br>
&gt;1. write-behind on with the fix<br>
&gt;2. quick-read and readdir-ahead off<br>
</span><span># gluster volume info log<br>
<br>
</span>performance.quick-read: off<br>
performance.readdir-ahead: off<br>
performance.stat-prefetch: on<br>
performance.write-behind: on<br>
<br>
<br>
with the above configuration and write-behind.so with patch 2, the &quot;tail truncated&quot; issue still be there.<br>
<br>
# tail -f syslog &gt;/dev/null<br>
<span>tail: syslog: file truncated<br>
tail: syslog: file truncated<br>
<br>
</span>FYI,<br></blockquote><div><br></div></span><div>Thanks George. I&#39;ll take a look.<br></div></div></div></div></blockquote><div><br></div></span><div>Can you please test with following configuration?</div></div></div></div></blockquote><div><br></div><div>George,<br></div><div>Do you have any way we can re-create this issue? I mean by creating a similar workload as yours? It seems to catch good bugs in caching layer. It would help in automating this case. If you have the steps, we can also find the fix sooner because the iteration speed to test/verify would be faster. Let us know.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>1. write-behind on with my fix</div><div>2. readdir-ahead and quick-read off</div><div>3. performance.stat-prefetch on</div><div>4. performance.force-readdirp off</div><div>5. dht.force-readdirp off</div><div>6. Also mount glusterfs with option &quot;use-readdirp=no&quot;</div><div><br></div><div><div>[root@booradley glusterfs]# mount -t glusterfs -o use-readdirp=no booradley:/newptop /mnt</div><div><br></div><div>[root@booradley glusterfs]# ps ax | grep -i mnt</div><div>14418 ?        Ssl    0:00 /usr/local/sbin/glusterfs --use-readdirp=no --volfile-server=booradley --volfile-id=/newptop /mnt</div><div><br></div><div>[root@booradley glusterfs]# gluster volume set newptop performance.write-behind on</div><div>volume set: success</div><div><br></div><div>[root@booradley glusterfs]# gluster volume set newptop performance.quick-read off</div><div>volume set: success</div><div><br></div><div>[root@booradley glusterfs]# gluster volume set newptop performance.stat-prefetch on</div><div>volume set: success</div><div><br></div><div>[root@booradley glusterfs]# gluster volume set newptop performance.force-readdirp off</div><div>volume set: success</div><div><br></div><div>[root@booradley glusterfs]# gluster volume set newptop dht.force-readdirp off</div><div>volume set: success</div><div><br></div><div>[root@booradley glusterfs]# gluster volume set newptop performance.readdir-ahead off<br></div><div>volume set: success</div><div><br></div><div>[root@booradley glusterfs]# gluster volume info newptop</div><div> </div><div>Volume Name: newptop</div><div>Type: Distribute</div><div>Volume ID: 092756e1-e095-4e05-9f14-<wbr>3e9a6aed908c</div><div>Status: Started</div><div>Snapshot Count: 0</div><div>Number of Bricks: 1</div><div>Transport-type: tcp</div><div>Bricks:</div><div>Brick1: booradley:/home/export/newptop</div><div>Options Reconfigured:</div><div>dht.force-readdirp: off</div><div>performance.force-readdirp: off</div><div>performance.stat-prefetch: on</div><div>performance.write-behind: on</div><div>performance.quick-read: off</div><div>transport.address-family: inet</div><div>performance.readdir-ahead: off</div><div>nfs.disable: on</div><div><br></div></div><div><div class="h5"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> <br></div><div><div class="m_3297952592040684392gmail-h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="m_3297952592040684392gmail-m_8097377878677447059im m_3297952592040684392gmail-m_8097377878677447059HOEnZb"><br>
Best Regards,<br>
George<br>
<br>
<br>
-----Original Message-----<br>
From: Raghavendra Gowdappa [mailto:<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>]<br>
</span><div class="m_3297952592040684392gmail-m_8097377878677447059HOEnZb"><div class="m_3297952592040684392gmail-m_8097377878677447059h5">Sent: Wednesday, November 02, 2016 5:41 PM<br>
To: Lian, George (Nokia - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;<br>
Cc: Raghavendra G &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Zizka, Jan (Nokia - CZ/Prague) &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;; Zhang, Bingxuan (Nokia - CN/Hangzhou) &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
Subject: Re: [Gluster-devel] Issue about the size of fstat is less than the really size of the syslog file<br>
<br>
<br>
<br>
----- Original Message -----<br>
&gt; From: &quot;George Lian (Nokia - CN/Hangzhou)&quot; &lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;<br>
&gt; To: &quot;Raghavendra Gowdappa&quot; &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt;<br>
&gt; Cc: &quot;Raghavendra G&quot; &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;, <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>, &quot;Jan Zizka (Nokia - CZ/Prague)&quot;<br>
&gt; &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;, &quot;Bingxuan Zhang (Nokia - CN/Hangzhou)&quot; &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; Sent: Wednesday, November 2, 2016 1:38:44 PM<br>
&gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less than the really size of the syslog file<br>
&gt;<br>
&gt; Yes, I confirm use the Patch 2.<br>
&gt;<br>
&gt; One update: the issue is occurred when readdir-ahead off and write-behind on.<br>
&gt; Seems gone when write-behind and readdir-ahead and quick-read all off.<br>
&gt; Not verified with readdir-ahead and quick-read both off and write-behind on<br>
&gt; till now.<br>
&gt;<br>
&gt; Need I test it with write-behind on and readdir-ahead and quick-read both<br>
&gt; off?<br>
<br>
Yes. I was assuming that the previous results were tested with:<br>
1. write-behind on with the fix<br>
2. quick-read and readdir-ahead off<br>
<br>
If not, test results with this configuration will help.<br>
<br>
&gt;<br>
&gt; Best Regards,<br>
&gt; George<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: Raghavendra Gowdappa [mailto:<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>]<br>
&gt; Sent: Wednesday, November 02, 2016 4:04 PM<br>
&gt; To: Lian, George (Nokia - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;<br>
&gt; Cc: Raghavendra G &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>;<br>
&gt; Zizka, Jan (Nokia - CZ/Prague) &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;; Zhang, Bingxuan (Nokia<br>
&gt; - CN/Hangzhou) &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less than the<br>
&gt; really size of the syslog file<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ----- Original Message -----<br>
&gt; &gt; From: &quot;George Lian (Nokia - CN/Hangzhou)&quot; &lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;<br>
&gt; &gt; To: &quot;Raghavendra Gowdappa&quot; &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt;<br>
&gt; &gt; Cc: &quot;Raghavendra G&quot; &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;, <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>,<br>
&gt; &gt; &quot;Jan Zizka (Nokia - CZ/Prague)&quot;<br>
&gt; &gt; &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;, &quot;Bingxuan Zhang (Nokia - CN/Hangzhou)&quot;<br>
&gt; &gt; &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; &gt; Sent: Wednesday, November 2, 2016 1:29:13 PM<br>
&gt; &gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less than the<br>
&gt; &gt; really size of the syslog file<br>
&gt; &gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; When those 3 options turn off, the issue seems gone in about 3 hours,<br>
&gt; &gt; otherwise, the issue will be occurred about every 10 minutes.<br>
&gt;<br>
&gt; That&#39;s a good news. IIRC, you mentioned that you saw the issue with just<br>
&gt; write-behind on, with fix applied (readdir-ahead and quick-read off). Can<br>
&gt; you please confirm you had patcset 2 of <a href="http://review.gluster.org/15757" rel="noreferrer" target="_blank">http://review.gluster.org/1575<wbr>7</a>?<br>
&gt; patchset 1 had some issues that I corrected in 2.<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; Best Regards,<br>
&gt; &gt; George<br>
&gt; &gt;<br>
&gt; &gt; -----Original Message-----<br>
&gt; &gt; From: Raghavendra Gowdappa [mailto:<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>]<br>
&gt; &gt; Sent: Wednesday, November 02, 2016 1:07 PM<br>
&gt; &gt; To: Lian, George (Nokia - CN/Hangzhou) &lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;<br>
&gt; &gt; Cc: Raghavendra G &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>;<br>
&gt; &gt; Zizka, Jan (Nokia - CZ/Prague) &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;; Zhang, Bingxuan<br>
&gt; &gt; (Nokia<br>
&gt; &gt; - CN/Hangzhou) &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less than the<br>
&gt; &gt; really size of the syslog file<br>
&gt; &gt;<br>
&gt; &gt; Can you try with following xlators turned off?<br>
&gt; &gt;<br>
&gt; &gt; 1. write-behind<br>
&gt; &gt; 2. readdir-ahead<br>
&gt; &gt; 3. quick-read<br>
&gt; &gt;<br>
&gt; &gt; regards,<br>
&gt; &gt; Raghavendra<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; From: &quot;George Lian (Nokia - CN/Hangzhou)&quot; &lt;<a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a>&gt;<br>
&gt; &gt; &gt; To: &quot;Raghavendra Gowdappa&quot; &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt;, &quot;Raghavendra G&quot;<br>
&gt; &gt; &gt; &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;<br>
&gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>, &quot;Jan Zizka (Nokia - CZ/Prague)&quot;<br>
&gt; &gt; &gt; &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;, &quot;Bingxuan Zhang (Nokia -<br>
&gt; &gt; &gt; CN/Hangzhou)&quot; &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; &gt; &gt; Sent: Wednesday, November 2, 2016 10:26:08 AM<br>
&gt; &gt; &gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less than<br>
&gt; &gt; &gt; the<br>
&gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Sorry, it seems the issue still there with readdir-ahead off.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; # tail -f syslog &gt;syslog.2.log<br>
&gt; &gt; &gt; tail: syslog: file truncated<br>
&gt; &gt; &gt; tail: syslog: file truncated<br>
&gt; &gt; &gt; tail: syslog: file truncated<br>
&gt; &gt; &gt; tail: syslog: file truncated<br>
&gt; &gt; &gt; tail: syslog: file truncated<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; tail: syslog: file truncated<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The last line is new truncated error message after the following set with<br>
&gt; &gt; &gt; option readdir-ahead.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; # gluster volume set log performance.readdir-ahead off<br>
&gt; &gt; &gt; volume set: success<br>
&gt; &gt; &gt; [root@SN-0(RNC-124) /root]<br>
&gt; &gt; &gt; # gluster volume info log<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Volume Name: log<br>
&gt; &gt; &gt; Type: Replicate<br>
&gt; &gt; &gt; Volume ID: 9d987a23-1d64-4857-980a-548f1d<wbr>d0d1e6<br>
&gt; &gt; &gt; Status: Started<br>
&gt; &gt; &gt; Number of Bricks: 1 x 2 = 2<br>
&gt; &gt; &gt; Transport-type: tcp<br>
&gt; &gt; &gt; Bricks:<br>
&gt; &gt; &gt; Brick1: 169.254.0.12:/mnt/bricks/log/b<wbr>rick<br>
&gt; &gt; &gt; Brick2: 169.254.0.13:/mnt/bricks/log/b<wbr>rick<br>
&gt; &gt; &gt; Options Reconfigured:<br>
&gt; &gt; &gt; performance.readdir-ahead: off<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; BRs<br>
&gt; &gt; &gt; George<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -----Original Message-----<br>
&gt; &gt; &gt; From: <a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@gluster.<wbr>org</a><br>
&gt; &gt; &gt; [mailto:<a href="mailto:gluster-devel-bounces@gluster.org" target="_blank">gluster-devel-bounces@<wbr>gluster.org</a>] On Behalf Of Raghavendra<br>
&gt; &gt; &gt; Gowdappa<br>
&gt; &gt; &gt; Sent: Tuesday, November 01, 2016 9:29 PM<br>
&gt; &gt; &gt; To: Raghavendra G &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;<br>
&gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>; Zizka, Jan (Nokia - CZ/Prague)<br>
&gt; &gt; &gt; &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;; Zhang, Bingxuan (Nokia - CN/Hangzhou)<br>
&gt; &gt; &gt; &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; &gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less than<br>
&gt; &gt; &gt; the<br>
&gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; &gt; From: &quot;Raghavendra G&quot; &lt;<a href="mailto:raghavendra@gluster.com" target="_blank">raghavendra@gluster.com</a>&gt;<br>
&gt; &gt; &gt; &gt; To: &quot;Pranith Kumar Karampuri&quot; &lt;<a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a>&gt;<br>
&gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a>, &quot;Jan Zizka (Nokia - CZ/Prague)&quot;<br>
&gt; &gt; &gt; &gt; &lt;<a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a>&gt;, &quot;Bingxuan Zhang (Nokia -<br>
&gt; &gt; &gt; &gt; CN/Hangzhou)&quot; &lt;<a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a>&gt;<br>
&gt; &gt; &gt; &gt; Sent: Tuesday, November 1, 2016 6:55:31 PM<br>
&gt; &gt; &gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less than<br>
&gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hi George,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; You can try your tests in two scenarios:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; 1. Switch off following performance translators:<br>
&gt; &gt; &gt; &gt; a. write-behind<br>
&gt; &gt; &gt; &gt; b. quick-read<br>
&gt; &gt; &gt; &gt; c. readdir-ahead<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Once you see that the issue goes away in the above scenario, you can<br>
&gt; &gt; &gt; &gt; apply<br>
&gt; &gt; &gt; &gt; write-behind fix [1] and turn write-behind on.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; We have a fix in quick-read at [2].<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; You can also try to test with the quick-read fix and turning quick-read<br>
&gt; &gt; &gt; &gt; on.<br>
&gt; &gt; &gt; &gt; However, since your issue is stale stat I doubt quick-read is not the<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; s/quick-read is not the culprit/quick-read is the culprit/<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; culprit here (The issue with quick-read is stale data).<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; We see that readdir-ahead is not updating/flushing the stats stored<br>
&gt; &gt; &gt; &gt; along<br>
&gt; &gt; &gt; &gt; with dentries when write or file modifications happen. That seem to be<br>
&gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; issue with readdir-ahead. For now, during both of the above two<br>
&gt; &gt; &gt; &gt; scenarios,<br>
&gt; &gt; &gt; &gt; please keep readdir-ahead off.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; [1] <a href="http://review.gluster.org/15757/2" rel="noreferrer" target="_blank">http://review.gluster.org/1575<wbr>7/2</a><br>
&gt; &gt; &gt; &gt; [2] <a href="http://review.gluster.org/#/c/15759/2" rel="noreferrer" target="_blank">http://review.gluster.org/#/c/<wbr>15759/2</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; regards,<br>
&gt; &gt; &gt; &gt; Raghavendra<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Tue, Nov 1, 2016 at 7:55 AM, Pranith Kumar Karampuri &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a><br>
&gt; &gt; &gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Tue, Nov 1, 2016 at 7:32 AM, Lian, George (Nokia - CN/Hangzhou) &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I will test it with your patches and update to you when I have result.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; hi George,<br>
&gt; &gt; &gt; &gt; Please use <a href="http://review.gluster.org/#/c/15757/2" rel="noreferrer" target="_blank">http://review.gluster.org/#/c/<wbr>15757/2</a> i.e. second version of<br>
&gt; &gt; &gt; &gt; Raghavendra&#39;s patch. I tested it and it worked fine. We are still<br>
&gt; &gt; &gt; &gt; trying<br>
&gt; &gt; &gt; &gt; to<br>
&gt; &gt; &gt; &gt; figure out quick-read and readdir-ahead as I type this mail.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanks a lots<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; From: Pranith Kumar Karampuri [mailto: <a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a> ]<br>
&gt; &gt; &gt; &gt; Sent: Monday, October 31, 2016 11:23 AM<br>
&gt; &gt; &gt; &gt; To: Lian, George (Nokia - CN/Hangzhou) &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; Cc: Raghavendra Gowdappa &lt; <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> &gt;; Zhang, Bingxuan<br>
&gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; -<br>
&gt; &gt; &gt; &gt; CN/Hangzhou) &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ;<br>
&gt; &gt; &gt; &gt; Zizka, Jan (Nokia - CZ/Prague) &lt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less than<br>
&gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Removing <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> , it is<br>
&gt; &gt; &gt; &gt; causing<br>
&gt; &gt; &gt; &gt; mail delivery problems for me.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; George,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Raghavendra and I made some progress on this issue. We were in parallel<br>
&gt; &gt; &gt; &gt; working on another issue which is similar where elastic search indices<br>
&gt; &gt; &gt; &gt; are<br>
&gt; &gt; &gt; &gt; getting corrupted because of wrong stat sizes in our opinion. So I have<br>
&gt; &gt; &gt; &gt; been<br>
&gt; &gt; &gt; &gt; running different translator stacks in identifying the problematic<br>
&gt; &gt; &gt; &gt; xlators<br>
&gt; &gt; &gt; &gt; which are leading to indices corruption.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; We found the list to be 1) Write-behind, 2) Quick-read, 3)<br>
&gt; &gt; &gt; &gt; Readdir-ahead.<br>
&gt; &gt; &gt; &gt; Raghavendra and I just had a chat and we are suspecting that lack of<br>
&gt; &gt; &gt; &gt; lookup/readdirp implementation in write-behind could be the reason for<br>
&gt; &gt; &gt; &gt; this<br>
&gt; &gt; &gt; &gt; problem. Similar problems may exist in other two xlators too. But we<br>
&gt; &gt; &gt; &gt; are<br>
&gt; &gt; &gt; &gt; working on write-behind with priority.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Our theory is this:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; If we do a 4KB write for example and it is cached in write-behind and<br>
&gt; &gt; &gt; &gt; we<br>
&gt; &gt; &gt; &gt; do<br>
&gt; &gt; &gt; &gt; a<br>
&gt; &gt; &gt; &gt; lookup on the file/do a readdirp on the directory with this file we<br>
&gt; &gt; &gt; &gt; send<br>
&gt; &gt; &gt; &gt; out<br>
&gt; &gt; &gt; &gt; wrong stat value to the kernel. There are different caches between<br>
&gt; &gt; &gt; &gt; kernel<br>
&gt; &gt; &gt; &gt; and gluster which may lead to fstat never coming till write-behind. So<br>
&gt; &gt; &gt; &gt; we<br>
&gt; &gt; &gt; &gt; need to make sure that we don&#39;t get into this situation.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Action items:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; At the moment Raghavendra is working on a patch to implement<br>
&gt; &gt; &gt; &gt; lookup/readdirp<br>
&gt; &gt; &gt; &gt; in write-behind. I am going to test the same for elastic search. Will<br>
&gt; &gt; &gt; &gt; it<br>
&gt; &gt; &gt; &gt; be<br>
&gt; &gt; &gt; &gt; possible for you to test your application against the same patch and<br>
&gt; &gt; &gt; &gt; confirm<br>
&gt; &gt; &gt; &gt; that the patch fixes the problem?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Fri, Oct 28, 2016 at 12:08 PM, Pranith Kumar Karampuri &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:pkarampu@redhat.com" target="_blank">pkarampu@redhat.com</a> &gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; hi George,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; It would help if we can identify the bare minimum xlators which are<br>
&gt; &gt; &gt; &gt; contributing to the issue like Raghavendra was mentioning earlier. We<br>
&gt; &gt; &gt; &gt; were<br>
&gt; &gt; &gt; &gt; wondering if it is possible for you to help us in identifying the issue<br>
&gt; &gt; &gt; &gt; by<br>
&gt; &gt; &gt; &gt; running the workload on a modified setup? We can suggest testing out<br>
&gt; &gt; &gt; &gt; using<br>
&gt; &gt; &gt; &gt; custom volfiles so that we can slowly build the graph which could be<br>
&gt; &gt; &gt; &gt; causing<br>
&gt; &gt; &gt; &gt; this issue. We would like you guys to try out this problem with just<br>
&gt; &gt; &gt; &gt; posix-xlator and fuse and nothing else.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Thu, Oct 27, 2016 at 1:40 PM, Lian, George (Nokia - CN/Hangzhou) &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt; wrote:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hi, Raghavendra,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Could you please give some suggestion for this issue? we try to find<br>
&gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; clue<br>
&gt; &gt; &gt; &gt; for this issue for a long time, but it has no progress:(<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; -----Original Message-----<br>
&gt; &gt; &gt; &gt; From: Lian, George (Nokia - CN/Hangzhou)<br>
&gt; &gt; &gt; &gt; Sent: Wednesday, October 19, 2016 4:40 PM<br>
&gt; &gt; &gt; &gt; To: &#39;Raghavendra Gowdappa&#39; &lt; <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> &gt;<br>
&gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ; I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X_GMS &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;; Zhang, Bingxuan<br>
&gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; -<br>
&gt; &gt; &gt; &gt; CN/Hangzhou) &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;; Zizka, Jan (Nokia -<br>
&gt; &gt; &gt; &gt; CZ/Prague)<br>
&gt; &gt; &gt; &gt; &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less than<br>
&gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hi, Raghavendra<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Just now, we test it with glusterfs log with debug-level &quot;TRACE&quot;, and<br>
&gt; &gt; &gt; &gt; let<br>
&gt; &gt; &gt; &gt; some application trigger &quot;glusterfs&quot; produce large log, in that case,<br>
&gt; &gt; &gt; &gt; when<br>
&gt; &gt; &gt; &gt; we set write-behind and stat-prefetch both OFF,<br>
&gt; &gt; &gt; &gt; Tail the glusterfs log such like mnt-{VOLUME-NAME}.log, it still failed<br>
&gt; &gt; &gt; &gt; with<br>
&gt; &gt; &gt; &gt; &quot;file truncated&quot;,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; So that means if file&#39;s IO in huge amount, the issue will still be<br>
&gt; &gt; &gt; &gt; there<br>
&gt; &gt; &gt; &gt; even<br>
&gt; &gt; &gt; &gt; write-behind and stat-prefetch both OFF.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; -----Original Message-----<br>
&gt; &gt; &gt; &gt; From: Raghavendra Gowdappa [mailto: <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> ]<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Sent: Wednesday, October 19, 2016 2:54 PM<br>
&gt; &gt; &gt; &gt; To: Lian, George (Nokia - CN/Hangzhou) &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ; I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X_GMS &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;; Zhang, Bingxuan<br>
&gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; -<br>
&gt; &gt; &gt; &gt; CN/Hangzhou) &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;; Zizka, Jan (Nokia -<br>
&gt; &gt; &gt; &gt; CZ/Prague)<br>
&gt; &gt; &gt; &gt; &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less than<br>
&gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; &gt; &gt; From: &quot;George Lian (Nokia - CN/Hangzhou)&quot; &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; To: &quot;Raghavendra Gowdappa&quot; &lt; <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> , &quot;I_EXT_MBB_WCDMA_SWD3_DA1_MATR<wbr>IX_GMS&quot;<br>
&gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;, &quot;Bingxuan Zhang<br>
&gt; &gt; &gt; &gt; &gt; (Nokia - CN/Hangzhou)&quot;<br>
&gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;, &quot;Jan Zizka (Nokia - CZ/Prague)&quot; &lt;<br>
&gt; &gt; &gt; &gt; &gt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; Sent: Wednesday, October 19, 2016 12:05:01 PM<br>
&gt; &gt; &gt; &gt; &gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less<br>
&gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Hi, Raghavendra,<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Thanks a lots for your quickly update!<br>
&gt; &gt; &gt; &gt; &gt; In my case, there are so many process(write) is writing to the syslog<br>
&gt; &gt; &gt; &gt; &gt; file,<br>
&gt; &gt; &gt; &gt; &gt; it do involve the writer is in the same host and writing in same<br>
&gt; &gt; &gt; &gt; &gt; mount<br>
&gt; &gt; &gt; &gt; &gt; point<br>
&gt; &gt; &gt; &gt; &gt; while the tail(reader) is reading it.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; The bug I just guess is:<br>
&gt; &gt; &gt; &gt; &gt; When a writer write the data with write-behind, it call the call-back<br>
&gt; &gt; &gt; &gt; &gt; function &quot; mdc_writev_cbk&quot; and called &quot;mdc_inode_iatt_set_validate&quot;<br>
&gt; &gt; &gt; &gt; &gt; to<br>
&gt; &gt; &gt; &gt; &gt; validate the &quot;iatt&quot; data, but with the code I mentioned last mail, it<br>
&gt; &gt; &gt; &gt; &gt; do<br>
&gt; &gt; &gt; &gt; &gt; nothing.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; mdc_inode_iatt_set_validate has following code<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &lt;snippet&gt;<br>
&gt; &gt; &gt; &gt; if (!iatt || !iatt-&gt;ia_ctime) {<br>
&gt; &gt; &gt; &gt; mdc-&gt;ia_time = 0;<br>
&gt; &gt; &gt; &gt; goto unlock;<br>
&gt; &gt; &gt; &gt; }<br>
&gt; &gt; &gt; &gt; &lt;/snippet&gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Which means a NULL iatt sets mdc-&gt;ia_time to 0. This results in<br>
&gt; &gt; &gt; &gt; subsequent<br>
&gt; &gt; &gt; &gt; lookup/stat calls to be NOT served from md-cache. Instead, the stat is<br>
&gt; &gt; &gt; &gt; served from backend bricks. So, I don&#39;t see an issue here.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; However, one case where a NULL iatt is different from a valid iatt<br>
&gt; &gt; &gt; &gt; (which<br>
&gt; &gt; &gt; &gt; differs from the value stored in md-cache) is that the latter results<br>
&gt; &gt; &gt; &gt; in<br>
&gt; &gt; &gt; &gt; a<br>
&gt; &gt; &gt; &gt; call to inode_invalidate. This invalidation propagates to kernel and<br>
&gt; &gt; &gt; &gt; all<br>
&gt; &gt; &gt; &gt; dentry and page cache corresponding to file is purged. So, I am<br>
&gt; &gt; &gt; &gt; suspecting<br>
&gt; &gt; &gt; &gt; whether the stale stat you saw was served from kernel cache (not from<br>
&gt; &gt; &gt; &gt; glusterfs). If this is the case, having mount options<br>
&gt; &gt; &gt; &gt; &quot;attribute-timeout=0&quot;<br>
&gt; &gt; &gt; &gt; and &quot;entry-timeout=0&quot; should&#39;ve helped.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I am still at loss to point out the RCA for this issue.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; And in same time, the reader(tail) read the &quot;iatt&quot; data, but in case<br>
&gt; &gt; &gt; &gt; &gt; of<br>
&gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; cache-time is not timeout, it will return the &quot;iatt&quot; data without the<br>
&gt; &gt; &gt; &gt; &gt; last<br>
&gt; &gt; &gt; &gt; &gt; change.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Do your think it is a possible bug?<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; -----Original Message-----<br>
&gt; &gt; &gt; &gt; &gt; From: Raghavendra Gowdappa [mailto: <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> ]<br>
&gt; &gt; &gt; &gt; &gt; Sent: Wednesday, October 19, 2016 2:06 PM<br>
&gt; &gt; &gt; &gt; &gt; To: Lian, George (Nokia - CN/Hangzhou) &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ; I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X_GMS<br>
&gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;; Zhang, Bingxuan<br>
&gt; &gt; &gt; &gt; &gt; (Nokia -<br>
&gt; &gt; &gt; &gt; &gt; CN/Hangzhou) &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;; Zizka, Jan (Nokia -<br>
&gt; &gt; &gt; &gt; &gt; CZ/Prague)<br>
&gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less<br>
&gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; &gt; &gt; &gt; From: &quot;George Lian (Nokia - CN/Hangzhou)&quot; &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; To: &quot;Raghavendra Gowdappa&quot; &lt; <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &quot;I_EXT_MBB_WCDMA_SWD3_DA1_MATR<wbr>IX_GMS&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;, &quot;Bingxuan<br>
&gt; &gt; &gt; &gt; &gt; &gt; Zhang<br>
&gt; &gt; &gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; &gt; &gt; - CN/Hangzhou)&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;, &quot;Jan Zizka (Nokia - CZ/Prague)&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Sent: Wednesday, October 19, 2016 10:51:24 AM<br>
&gt; &gt; &gt; &gt; &gt; &gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less<br>
&gt; &gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Hi, Raghavendra,<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; When we disable md-cache(gluster volume set log<br>
&gt; &gt; &gt; &gt; &gt; &gt; performance.md-cache-timeout<br>
&gt; &gt; &gt; &gt; &gt; &gt; 0), the issue seems gone.<br>
&gt; &gt; &gt; &gt; &gt; &gt; (we can&#39;t disable with &quot; gluster volume set log<br>
&gt; &gt; &gt; &gt; &gt; &gt; performance.md-cache<br>
&gt; &gt; &gt; &gt; &gt; &gt; off&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; why?)<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Please use<br>
&gt; &gt; &gt; &gt; &gt; #gluster volume set log performance.stat-prefetch off<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; So I double confuse that the code I abstract in last mail maybe<br>
&gt; &gt; &gt; &gt; &gt; &gt; have<br>
&gt; &gt; &gt; &gt; &gt; &gt; some<br>
&gt; &gt; &gt; &gt; &gt; &gt; issue for this case.<br>
&gt; &gt; &gt; &gt; &gt; &gt; Could you please share your comments?<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Please find my comments below.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Thanks &amp; Best Regards,<br>
&gt; &gt; &gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; -----Original Message-----<br>
&gt; &gt; &gt; &gt; &gt; &gt; From: Lian, George (Nokia - CN/Hangzhou)<br>
&gt; &gt; &gt; &gt; &gt; &gt; Sent: Friday, October 14, 2016 1:44 PM<br>
&gt; &gt; &gt; &gt; &gt; &gt; To: &#39;Raghavendra Gowdappa&#39; &lt; <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ; I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X_GMS<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;; Zhang,<br>
&gt; &gt; &gt; &gt; &gt; &gt; Bingxuan<br>
&gt; &gt; &gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; &gt; &gt; -<br>
&gt; &gt; &gt; &gt; &gt; &gt; CN/Hangzhou) &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;; Zizka, Jan (Nokia -<br>
&gt; &gt; &gt; &gt; &gt; &gt; CZ/Prague)<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Subject: RE: [Gluster-devel] Issue about the size of fstat is less<br>
&gt; &gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Hi, Raghavendra,<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Our version of GlusterFS is 3.6.9, and I also check the newest code<br>
&gt; &gt; &gt; &gt; &gt; &gt; of<br>
&gt; &gt; &gt; &gt; &gt; &gt; main<br>
&gt; &gt; &gt; &gt; &gt; &gt; branch, the function of &quot; mdc_inode_iatt_set_validate&quot; is almost<br>
&gt; &gt; &gt; &gt; &gt; &gt; same,<br>
&gt; &gt; &gt; &gt; &gt; &gt; from<br>
&gt; &gt; &gt; &gt; &gt; &gt; the following code of this function,<br>
&gt; &gt; &gt; &gt; &gt; &gt; We could see a &quot;TODO&quot; comments inline, does it mean if we enhance<br>
&gt; &gt; &gt; &gt; &gt; &gt; write-behind feature, the &quot;iatt&quot; field in callback will be NULL, so<br>
&gt; &gt; &gt; &gt; &gt; &gt; that<br>
&gt; &gt; &gt; &gt; &gt; &gt; inode_invalidate will not be called? So the size of file will not<br>
&gt; &gt; &gt; &gt; &gt; &gt; update<br>
&gt; &gt; &gt; &gt; &gt; &gt; since &quot;write behind&quot; enabled ?<br>
&gt; &gt; &gt; &gt; &gt; &gt; Is it the root cause for &quot;tail&quot; application failed with &quot;file<br>
&gt; &gt; &gt; &gt; &gt; &gt; truncated&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; issue ?<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; LOCK (&amp;mdc-&gt;lock);<br>
&gt; &gt; &gt; &gt; &gt; &gt; {<br>
&gt; &gt; &gt; &gt; &gt; &gt; if (!iatt || !iatt-&gt;ia_ctime) {<br>
&gt; &gt; &gt; &gt; &gt; &gt; mdc-&gt;ia_time = 0;<br>
&gt; &gt; &gt; &gt; &gt; &gt; goto unlock;<br>
&gt; &gt; &gt; &gt; &gt; &gt; }<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; /*<br>
&gt; &gt; &gt; &gt; &gt; &gt; * Invalidate the inode if the mtime or ctime has changed<br>
&gt; &gt; &gt; &gt; &gt; &gt; * and the prebuf doesn&#39;t match the value we have cached.<br>
&gt; &gt; &gt; &gt; &gt; &gt; * TODO: writev returns with a NULL iatt due to<br>
&gt; &gt; &gt; &gt; &gt; &gt; * performance/write-behind, causing invalidation on writes.<br>
&gt; &gt; &gt; &gt; &gt; &gt; */<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; The issue explained in this comment is hit only when writes are done.<br>
&gt; &gt; &gt; &gt; &gt; But,<br>
&gt; &gt; &gt; &gt; &gt; in<br>
&gt; &gt; &gt; &gt; &gt; your use-case only &quot;tail&quot; is the application running on the mount (If<br>
&gt; &gt; &gt; &gt; &gt; I<br>
&gt; &gt; &gt; &gt; &gt; am<br>
&gt; &gt; &gt; &gt; &gt; not wrong, the writer is running on a different mountpoint). So, I<br>
&gt; &gt; &gt; &gt; &gt; doubt<br>
&gt; &gt; &gt; &gt; &gt; you are hitting this issue. But, you are saying that the issue goes<br>
&gt; &gt; &gt; &gt; &gt; away<br>
&gt; &gt; &gt; &gt; &gt; when write-behind/md-cache is turned off pointing to some interaction<br>
&gt; &gt; &gt; &gt; &gt; between md-cache and write-behind causing the issue. I need more time<br>
&gt; &gt; &gt; &gt; &gt; to<br>
&gt; &gt; &gt; &gt; &gt; look into this issue. Can you file a bug on this?<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; if (IA_ISREG(inode-&gt;ia_type) &amp;&amp;<br>
&gt; &gt; &gt; &gt; &gt; &gt; ((iatt-&gt;ia_mtime != mdc-&gt;md_mtime) ||<br>
&gt; &gt; &gt; &gt; &gt; &gt; (iatt-&gt;ia_ctime != mdc-&gt;md_ctime)))<br>
&gt; &gt; &gt; &gt; &gt; &gt; if (!prebuf || (prebuf-&gt;ia_ctime != mdc-&gt;md_ctime) ||<br>
&gt; &gt; &gt; &gt; &gt; &gt; (prebuf-&gt;ia_mtime != mdc-&gt;md_mtime))<br>
&gt; &gt; &gt; &gt; &gt; &gt; inode_invalidate(inode);<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; mdc_from_iatt (mdc, iatt);<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; time (&amp;mdc-&gt;ia_time);<br>
&gt; &gt; &gt; &gt; &gt; &gt; }<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt; &gt; &gt; -----Original Message-----<br>
&gt; &gt; &gt; &gt; &gt; &gt; From: Raghavendra Gowdappa [mailto: <a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a> ]<br>
&gt; &gt; &gt; &gt; &gt; &gt; Sent: Thursday, October 13, 2016 8:58 PM<br>
&gt; &gt; &gt; &gt; &gt; &gt; To: Lian, George (Nokia - CN/Hangzhou) &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Cc: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a> ; I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X_GMS<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;; Zhang,<br>
&gt; &gt; &gt; &gt; &gt; &gt; Bingxuan<br>
&gt; &gt; &gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; &gt; &gt; -<br>
&gt; &gt; &gt; &gt; &gt; &gt; CN/Hangzhou) &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;; Zizka, Jan (Nokia -<br>
&gt; &gt; &gt; &gt; &gt; &gt; CZ/Prague)<br>
&gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; Subject: Re: [Gluster-devel] Issue about the size of fstat is less<br>
&gt; &gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; From: &quot;George Lian (Nokia - CN/Hangzhou)&quot; &lt; <a href="mailto:george.lian@nokia.com" target="_blank">george.lian@nokia.com</a><br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; To: <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Cc: &quot;I_EXT_MBB_WCDMA_SWD3_DA1_MATR<wbr>IX_GMS&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:I_EXT_MBB_WCDMA_SWD3_DA1_MATRIX@internal.nsn.com" target="_blank">I_EXT_MBB_WCDMA_SWD3_DA1_MATRI<wbr>X@internal.nsn.com</a> &gt;, &quot;Bingxuan<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Zhang<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; (Nokia<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; - CN/Hangzhou)&quot; &lt; <a href="mailto:bingxuan.zhang@nokia.com" target="_blank">bingxuan.zhang@nokia.com</a> &gt;, &quot;Jan Zizka (Nokia -<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; CZ/Prague)&quot;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &lt; <a href="mailto:jan.zizka@nokia.com" target="_blank">jan.zizka@nokia.com</a> &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Sent: Thursday, October 13, 2016 2:33:53 PM<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Subject: [Gluster-devel] Issue about the size of fstat is less<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; really size of the syslog file<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Hi, Dear Expert,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; We have use glusterfs as a network filesystem, and syslog store<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; in<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; there,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; some clients on different host may write the syslog file via<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; “glusterfs”<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; mount point.<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Now we encounter an issue when we “tail” the syslog file, it will<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; occasional<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; failed with error “ file truncated ”<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; As we study and trace with the “tail” source code, it failed with<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; following code:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; if ( S_ISREG (mode) &amp;&amp; stats.st_size &lt; f[i].size )<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; {<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; error (0, 0, _(&quot;%s: file truncated&quot;), quotef (name));<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; /* Assume the file was truncated to 0,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; and therefore output all &quot;new&quot; data. */<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; xlseek (fd, 0, SEEK_SET, name);<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; f[i].size = 0;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; }<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; When stats.st_size &lt; f[i].size, what mean the size report by<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; fstat<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; is<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; less<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; than “tail” had read, it lead to “file truncated”, we also use<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; “strace”<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; tools to trace the tail application, the related tail strace log<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; as<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; below:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; nanosleep({1, 0}, NULL) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; fstat(3, {st_mode=S_IFREG|0644, st_size=192543105, ...}) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; nanosleep({1, 0}, NULL) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; fstat(3, {st_mode=S_IFREG|0644, st_size=192543105, ...}) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; nanosleep({1, 0}, NULL) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; fstat(3, {st_mode=S_IFREG|0644, st_size=192543105, ...}) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; nanosleep({1, 0}, NULL) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; fstat(3, {st_mode=S_IFREG|0644, st_size=192544549, ...}) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; read(3, &quot; Data … -&quot;..., 8192) = 1444<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; read(3, &quot; Data.. &quot;..., 8192) = 720<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; read(3, &quot;&quot;, 8192) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; fstat(3, {st_mode=S_IFREG|0644, st_size=192544789, ...}) = 0<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; write(1, “DATA…..” ) = 2164<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; write(2, &quot;tail: &quot;, 6tail: ) = 6<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; write(2, &quot;/mnt/log/master/syslog: file tru&quot;...,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 38/mnt/log/master/syslog:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; file truncated) = 38<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; as the above strace log, tail has read 1444+720=2164 bytes,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; but fstat tell “tail” 192544789 – 192543105 = 1664 which less<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; than<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; 2164,<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; so<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; it lead to “tail” application “file truncated”.<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; And if we turn off “write-behind” feature, the issue will not be<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; reproduced<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; any more.<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; That seems strange. There are no writes happening on the fd/inode<br>
&gt; &gt; &gt; &gt; &gt; &gt; through<br>
&gt; &gt; &gt; &gt; &gt; &gt; which tail is reading/stating from. So, it seems strange that<br>
&gt; &gt; &gt; &gt; &gt; &gt; write-behind<br>
&gt; &gt; &gt; &gt; &gt; &gt; is involved here. I suspect whether any of<br>
&gt; &gt; &gt; &gt; &gt; &gt; md-cache/read-ahead/io-cache<br>
&gt; &gt; &gt; &gt; &gt; &gt; is<br>
&gt; &gt; &gt; &gt; &gt; &gt; causing the issue. Can you,<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; 1. Turn off md-cache, read-ahead, io-cache xlators<br>
&gt; &gt; &gt; &gt; &gt; &gt; 2. mount glusterfs with --attribute-timeout=0<br>
&gt; &gt; &gt; &gt; &gt; &gt; 3. set write-behind on<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; and rerun the tests? If you don&#39;t hit the issue, you can experiment<br>
&gt; &gt; &gt; &gt; &gt; &gt; by<br>
&gt; &gt; &gt; &gt; &gt; &gt; turning on/off of md-cache, read-ahead and io-cache translators and<br>
&gt; &gt; &gt; &gt; &gt; &gt; see<br>
&gt; &gt; &gt; &gt; &gt; &gt; what<br>
&gt; &gt; &gt; &gt; &gt; &gt; are the minimal number of xlators that need to be turned off to not<br>
&gt; &gt; &gt; &gt; &gt; &gt; hit<br>
&gt; &gt; &gt; &gt; &gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; &gt; issue (with write-behind on)?<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; regards,<br>
&gt; &gt; &gt; &gt; &gt; &gt; Raghavendra<br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; So we think it may be related to cache consistence issue due to<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; performance<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; consider, but we still have concern that:<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; The syslog file is used only with “Append” mode, so the size of<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; file<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; shouldn’t be reduced, when a client read the file, why “fstat”<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; can’t<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; return<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; the really size match to the cache?<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; From current investigation, we doubt that the current implement<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; of<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; “glusterfs” has a bug on “fstat” when cache is on.<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Your comments is our highly appreciated!<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Thanks &amp; Best Regards<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; George<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
&gt; &gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Pranith<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Pranith<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; Pranith<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; Raghavendra G<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
&gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; Gluster-devel mailing list<br>
&gt; &gt; &gt; <a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
&gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a><br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
______________________________<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://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/mailman<wbr>/listinfo/gluster-devel</a></div></div></blockquote></div></div></div><span class="m_3297952592040684392gmail-HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_3297952592040684392gmail-m_8097377878677447059gmail_signature">Raghavendra G<br></div>
</font></span></div></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_3297952592040684392gmail_signature">Raghavendra G<br></div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br></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>