<div dir="ltr">Hi,<br><br>I figured out what's happening. The issue is that the file has 'c|a|m' time set to future (The file is created after the date is set to +30 days). This<br>is done from client-1. On client-2 with correct date, when data is appended, it doesn't update the mtime and ctime because of both mtime and ctime is less than<br>already set time on the file. This protection is required to keep the latest time when two clients are writing to the same file. We update c|m|a time only if it's greater than<br>existing time. As a result, the perf xlators on client1 which relies on mtime doesn't send read to server as it thinks nothing is changed as in this case the times haven't<br>changed.<div><br></div><div>Workarounds:<br>1. Disabling quick-read solved the issue for me.<br><br></div><div>I don't know how real this kind of workload is? Is this a normal scenario ?<br>The other thing to do is to remove that protection of updating time only if it's greater but that would open up the race when two clients are updating the same file.</div><div>This would result in keeping the older time than the latest. This requires code change and I don't think that should be done.</div><div><br></div><div>Thanks,<br>Kotresh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 11, 2020 at 3:02 PM Kotresh Hiremath Ravishankar <<a href="mailto:khiremat@redhat.com">khiremat@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Exactly, I am also curious about this. I will debug and update about what's exactly happening.<div><br></div><div>Thanks,<br>Kotresh </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 11, 2020 at 1:56 PM Zhou, Cynthia (NSB - CN/Hangzhou) <<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal">I used to think the file is cached in some client side buffer, because I’ve checked from different sn brick, the file content are all correct. But when I open client side trace level log, and cat the file, I only find lookup/open/flush
fop from fuse-bridge side, I am just wondering how is file content served to client side? Should not there be readv fop seen from trace log?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">cynthia<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Zhou, Cynthia (NSB - CN/Hangzhou) <br>
<b>Sent:</b> 2020<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">年</span>3<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">月</span>11<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">日</span> 15:54<br>
<b>To:</b> 'Kotresh Hiremath Ravishankar' <<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>><br>
<b>Subject:</b> RE: could you help to check about a glusterfs issue seems to be related to ctime<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Does that require, that for all the time client should be time synched? What if the client time is not synched for a while? And then restored?<u></u><u></u></p>
<p class="MsoNormal">I make a test when time has been restored and then client change the file, the file’s modify time, access times remains to be wrong, is that correct?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">root@mn-0:/home/robot]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""># echo "fromm mn-0">>/mnt/export/testfile<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">[root@mn-0:/home/robot]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""># stat /mnt/export/testfile<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> File: /mnt/export/testfile<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> Size: 30 Blocks: 1 IO Block: 131072 regular file<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Device: 28h/40d Inode: 9855109080001305442 Links: 1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 615/_nokfsuifileshare)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:red">Access: 2020-05-10 09:33:59.713840197 +0300<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:red">Modify: 2020-05-10 09:33:59.713840197 +0300<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:red">Change: 2020-05-10 09:33:59.714413772 +0300 //remains to be future time<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Birth: -<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">[root@mn-0:/home/robot]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""># cat /mnt/export/testfil<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">cat: /mnt/export/testfil: No such file or directory<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">[root@mn-0:/home/robot]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""># cat /mnt/export/testfile<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">from mn0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">from mn-1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">fromm mn-0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">[root@mn-0:/home/robot]<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""># date<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Wed 11 Mar 2020 09:05:58 AM EET<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">[root@mn-0:/home/robot]<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">cynthia<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>From:</b> Kotresh Hiremath Ravishankar <<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>>
<br>
<b>Sent:</b> 2020<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">年</span>3<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">月</span>11<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">日</span> 15:41<br>
<b>To:</b> Zhou, Cynthia (NSB - CN/Hangzhou) <<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>><br>
<b>Subject:</b> Re: could you help to check about a glusterfs issue seems to be related to ctime<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Mar 11, 2020 at 12:46 PM Zhou, Cynthia (NSB - CN/Hangzhou) <<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal">But there are times that ntp service went wrong, and time on two storage nodes may be not synced.<u></u><u></u></p>
<p class="MsoNormal">Or do you mean when can not guarantee that the time on two clients is synched, we should not enable this ctime feature?<u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal">Yes, that's correct. The ctime feature relies on the time generated at the client (that's the utime xlator loaded in client) and hence<br>
expects all clients to be ntp synced. <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Without ctime feature, is there some way to avoid this “file changed as we read it” issue?<u></u><u></u></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal">Unfortunately no. That's the only way as of now. <u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal">cynthia<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><b>From:</b> Kotresh Hiremath Ravishankar <<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>>
<br>
<b>Sent:</b> 2020<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">年</span>3<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">月</span>11<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">日</span> 15:12<br>
<b>To:</b> Zhou, Cynthia (NSB - CN/Hangzhou) <<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>><br>
<b>Subject:</b> Re: could you help to check about a glusterfs issue seems to be related to ctime<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Hi,<br>
<br>
I have not looked at it. I will take a look and update you. But one of the pre-requisite for ctime feature is that the clients should be time synced (ntp or other means).<br>
Could you try your reproducer by syncing the time of all clients and update me back ?<br>
<br>
Thanks,<u></u><u></u></p>
<div>
<p class="MsoNormal">Kotresh HR<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Mar 11, 2020 at 12:37 PM Zhou, Cynthia (NSB - CN/Hangzhou) <<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal">I make some test<u></u><u></u></p>
<p class="MsoNormal">After change date to future, and touch a file write sth, then restore time to normal.<u></u><u></u></p>
<p class="MsoNormal">Then append sth to the file, the file modify time access time is still future, it is not the same with ext4,<u></u><u></u></p>
<p class="MsoNormal">I think this is wrong.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">[root@mn-0:/home/robot]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"># echo "fromm mn-0">>/mnt/export/testfile</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">[root@mn-0:/home/robot]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"># stat /mnt/export/testfile</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"> File: /mnt/export/testfile</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"> Size: 30 Blocks: 1 IO Block: 131072 regular file</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Device: 28h/40d Inode: 9855109080001305442 Links: 1</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 615/_nokfsuifileshare)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Access: 2020-05-10 09:33:59.713840197 +0300</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Modify: 2020-05-10 09:33:59.713840197 +0300</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Change: 2020-05-10 09:33:59.714413772 +0300</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Birth: -</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">[root@mn-0:/home/robot]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"># cat /mnt/export/testfil</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">cat: /mnt/export/testfil: No such file or directory</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">[root@mn-0:/home/robot]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"># cat /mnt/export/testfile</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">from mn0</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">from mn-1</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">fromm mn-0</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">[root@mn-0:/home/robot]</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt"># date</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">Wed 11 Mar 2020 09:05:58 AM EET</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:8pt">[root@mn-0:/home/robot]</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">cynthia<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>From:</b> Zhou, Cynthia (NSB - CN/Hangzhou)
<br>
<b>Sent:</b> 2020<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">年</span>3<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">月</span>11<span lang="ZH-CN" style="font-family:微软雅黑,sans-serif">日</span> 14:41<br>
<b>To:</b> '<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>' <<a href="mailto:khiremat@redhat.com" target="_blank">khiremat@redhat.com</a>><br>
<b>Subject:</b> could you help to check about a glusterfs issue seems to be related to ctime<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Hi glusterfs expert,<u></u><u></u></p>
<p class="MsoNormal">Good day!<u></u><u></u></p>
<p class="MsoNormal">Do you have a time to check the ticket :
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1811907" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1811907</a> ?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">After I disable feature ctime this issue is gone, however, I meet erro “file changed as we read it” when using tar command.<u></u><u></u></p>
<p class="MsoNormal">Have you any idea?<u></u><u></u></p>
<p class="MsoNormal">Thanks!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Cynthia<u></u><u></u></p>
<p class="MsoNormal">Nokia storage team<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal">--
<u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Thanks and Regards,<u></u><u></u></p>
</div>
<p class="MsoNormal">Kotresh H R<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Thanks and Regards,<u></u><u></u></p>
</div>
<p class="MsoNormal">Kotresh H R<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Thanks and Regards,<br></div>Kotresh H R<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Thanks and Regards,<br></div>Kotresh H R<br></div></div>