<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:37:26 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-3849] Client cache directory information is not updated</title>
                <link>https://jira.whamcloud.com/browse/LU-3849</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;On a customer cluster, we noticed that Lustre client cache directory information is not updated when directory owner or access mode changes.&lt;/p&gt;

&lt;p&gt;If a user tries to change owner/group or directory mode and then looks for the change from another node, the change is not visible. Moreover, the more we look, the more the cache update is delayed.&lt;/p&gt;

&lt;p&gt;We were suspecting troubles related to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3671&quot; title=&quot;why are permission changes synchronous?&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3671&quot;&gt;&lt;del&gt;LU-3671&lt;/del&gt;&lt;/a&gt;, but we checked that sync_permission is set to 1.&lt;/p&gt;

&lt;p&gt;This problem is easy to reproduce:&lt;br/&gt;
 Node 1 : make directory&lt;br/&gt;
   with umask 0027&lt;br/&gt;
   mkdir &amp;lt;lustre filesystem&amp;gt;/&amp;lt;new directory&amp;gt;&lt;/p&gt;

&lt;p&gt; Node 2 : add directory in node2 cache&lt;br/&gt;
   cd &amp;lt;lustre filesystem&amp;gt;/&amp;lt;new directory&amp;gt;&lt;br/&gt;
   ls -lia&lt;/p&gt;

&lt;p&gt; Node 1 : update directory&lt;br/&gt;
   chmod 770 &amp;lt;lustre filesystem&amp;gt;/&amp;lt;new directory&amp;gt;&lt;br/&gt;
   or&lt;br/&gt;
   chown&lt;br/&gt;
   or both&lt;/p&gt;

&lt;p&gt; Node 2 : look for the change&lt;br/&gt;
   ls -lia (don&apos;t wait more than 10s)&lt;/p&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Sebastien.&lt;/p&gt;</description>
                <environment></environment>
        <key id="20662">LU-3849</key>
            <summary>Client cache directory information is not updated</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="laisiyao">Lai Siyao</assignee>
                                    <reporter username="sebastien.buisson">Sebastien Buisson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Aug 2013 15:07:20 +0000</created>
                <updated>Wed, 16 Oct 2013 03:05:22 +0000</updated>
                            <resolved>Fri, 11 Oct 2013 21:20:04 +0000</resolved>
                                    <version>Lustre 2.1.5</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="65320" author="pjones" created="Wed, 28 Aug 2013 22:19:56 +0000"  >&lt;p&gt;Lai&lt;/p&gt;

&lt;p&gt;Could you please advise on this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="65361" author="laisiyao" created="Thu, 29 Aug 2013 13:23:50 +0000"  >&lt;p&gt;This issue should have existed for quite some time:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;open dir by `ls -lia` fetches CR LOOKUP|OPEN lock.&lt;/li&gt;
	&lt;li&gt;setattr by `chown ...` enqueues a PW LOOKUP lock.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;But CR and PW mode are compatible, so the first lock is not canceled, and client get old stats.&lt;/p&gt;

&lt;p&gt;Changing setattr lock mode from PW to EX can fix this, I&apos;ll commit a fix later.&lt;/p&gt;</comment>
                            <comment id="65363" author="shadow" created="Thu, 29 Aug 2013 13:35:28 +0000"  >&lt;p&gt;dup of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3240&quot; title=&quot;The link count is not updated after the mkdir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3240&quot;&gt;&lt;del&gt;LU-3240&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="65365" author="sebastien.buisson" created="Thu, 29 Aug 2013 14:07:16 +0000"  >&lt;p&gt;Alex,&lt;/p&gt;

&lt;p&gt;You mean patch at &lt;a href=&quot;http://review.whamcloud.com/6460&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6460&lt;/a&gt; will fix this issue?&lt;/p&gt;</comment>
                            <comment id="65387" author="shadow" created="Thu, 29 Aug 2013 17:58:08 +0000"  >&lt;p&gt;i&apos;m not a fully sure, but that patch disable matching a some locks&apos;s locally, a specially client will skip open lock if they need attributes for an inode (&lt;a href=&quot;http://review.whamcloud.com/#/c/6460/3/lustre/mdc/mdc_locks.c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/6460/3/lustre/mdc/mdc_locks.c&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;also readdir isn&apos;t create a lock to match to get an valid attributes, so i suggest to ask you to test that patch before Liang will create a new patch.&lt;/p&gt;</comment>
                            <comment id="65457" author="patrick.valentin" created="Fri, 30 Aug 2013 17:32:19 +0000"  >&lt;p&gt;I have reproduced this error on lustre 2.1.6 and lustre 2.4.0.&lt;/p&gt;

&lt;p&gt;I have backported this patch on lustre 2.4 and I will test it next week.&lt;/p&gt;

&lt;p&gt;I have made some additional tests, and I have noticed that the information printed by &quot;ls&quot; is correct if we specify the directory.&lt;br/&gt;
&quot;ls -la .&quot; or &quot;ls -la $PWD&quot; on &quot;node 2&quot; prints the current (correct) inode information.&lt;/p&gt;

&lt;p&gt;But if we issue a chmod/chown/chgrp/mkdir/rmdir on &quot;node 1&quot;, and then a &quot;ls&quot; on &quot;node 2&quot;, without specifying a &quot;directory name&quot;, and whatever option is specified, then the inode information printed does not reflect the last change made on &quot;node 1&quot;. Moreover, if we issue a second &quot;ls&quot; command, but this time adding &quot;.&quot; or &quot;$PWD&quot;, the printed inode information is still bad.&lt;/p&gt;

&lt;p&gt;Looking at &quot;ls&quot; source code, it appears that the code starts with an &quot;opendir()&quot; and a loop of &quot;readdir()&quot; on the current directory, when no file or directory is specified. If a name is specified, then the command starts by &quot;stat()&quot; on this name.&lt;/p&gt;

&lt;p&gt;I wrote the following simple command, allowing to show that the culprit is readdir().&lt;/p&gt;

&lt;p&gt;The command first issues an opendir() of &quot;.&quot; and a loop of readdir()/printf() , but only if an argument is specified.&lt;br/&gt;
It then issues a stat() on &quot;.&quot;, and prints some inode fields.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;#include &amp;lt;sys/types.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;
#include &amp;lt;sys/stat.h&amp;gt;
#include &amp;lt;dirent.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;

main(int argc, char **argv)
{
    struct stat dir_stat;
    DIR *dirp;
    struct dirent *next;

    if (argc &amp;gt; 1) {
        dirp = opendir(&quot;.&quot;);
        if (! dirp) {
            perror(&quot;opendir: &quot;);
            exit(1);
        }
        while (next = readdir(dirp)) {
            printf(&quot;%s &quot;, next-&amp;gt;d_name);
        }
        printf(&quot;\n&quot;);
        closedir(dirp);
    }

    if (stat(&quot;.&quot;, &amp;amp;dir_stat) &amp;lt; 0) {
        perror(&quot;stat: &quot;);
        exit(1);
    }
    printf(&quot;st_nlink %d, st_mode 0%ho, st_uid  0x%hx, st_gid  0x%hx\n&quot;, dir_stat.st_nlink, dir_stat.st_mode, dir_stat.st_uid, dir_stat.st_gid);

    exit(0);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To reproduce the error, you have to run the chmod/chown/chgrp/mkdir/rmdir commands on &quot;node 1&quot;, and after each one, run &quot;my_stat --&quot; on &quot;node 2&quot;.&lt;br/&gt;
The changes made on &quot;node 1&quot; are not reflected on &quot;node 2&quot;.&lt;/p&gt;

&lt;p&gt;Now re-issue one of the commands on &quot;node 1&quot;, and run &quot;my_stat&quot; without argument on &quot;node 2&quot;. All the changes made previously are now visible.&lt;/p&gt;


&lt;p&gt;I have also checked that the problem described in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3240&quot; title=&quot;The link count is not updated after the mkdir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3240&quot;&gt;&lt;del&gt;LU-3240&lt;/del&gt;&lt;/a&gt; is indentical, but only with mkdir/rmdir when only one node is in use.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;for i in `seq 1 10`; do
    mkdir d$i
    my_stat --
done
mkdir last
my_stat
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;During the loop, the st_nlink is not correct (always 2, instead of 3, 4, 5, ...).&lt;br/&gt;
At the end of the loop, after issueing a new mkdir, and then a stat() without readdir(), the st_nlink=13 is the correct value.&lt;/p&gt;





</comment>
                            <comment id="65568" author="laisiyao" created="Tue, 3 Sep 2013 04:13:57 +0000"  >&lt;p&gt;In my test I found another issue:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;ll_get_dir_page() may enqueue UPDATE lock, but it doesn&apos;t inode attributes, so these informations may look stale on client side with UPDATE lock held.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="65571" author="shadow" created="Tue, 3 Sep 2013 06:00:10 +0000"  >&lt;p&gt;Lyang,&lt;/p&gt;

&lt;p&gt;problem is - ll_get_dir_page take a lock but don&apos;t take a intent body so don&apos;t update inode with info from server.&lt;/p&gt;


&lt;p&gt;&amp;gt; During the loop, the st_nlink is not correct (always 2, instead of 3, 4, 5, ...).&lt;br/&gt;
take a patch, it&apos;s looks same problem and test looks same &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; please look to sanity 39o test.&lt;/p&gt;</comment>
                            <comment id="65826" author="patrick.valentin" created="Thu, 5 Sep 2013 12:05:16 +0000"  >&lt;p&gt;Alexey, Lai,&lt;br/&gt;
I tested set 4 of patch &lt;a href=&quot;http://review.whamcloud.com/6460&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6460&lt;/a&gt; on a lustre 2.4.0 client, and it fixes the issue described above, as well as the issue described in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3240&quot; title=&quot;The link count is not updated after the mkdir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3240&quot;&gt;&lt;del&gt;LU-3240&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="65829" author="shadow" created="Thu, 5 Sep 2013 12:18:11 +0000"  >&lt;p&gt;Thanks to testing! &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; I hope Intel will found time to land it patch.&lt;/p&gt;</comment>
                            <comment id="65978" author="morrone" created="Fri, 6 Sep 2013 21:07:01 +0000"  >&lt;p&gt;Alexey, the patch in question has a -1 code review which will need to be resolved (additional explanation, code fix, whatever is needed) before before landing can be expected.&lt;/p&gt;</comment>
                            <comment id="66001" author="shadow" created="Sat, 7 Sep 2013 07:36:58 +0000"  >&lt;p&gt;Christopher,&lt;/p&gt;

&lt;p&gt;I think we need to choose a different reviewer because questions is very strange and can&apos;t be implemented without MDT rewrite (a specially mdt_getattr_name_lock don&apos;t able to return lock without look to parent).&lt;br/&gt;
If IT_READIR was don&apos;t drop on 2.x protocol it&apos;s more easy to fix, but now it&apos;s need too much compatibility code.&lt;/p&gt;
</comment>
                            <comment id="66913" author="utopiabound" created="Wed, 18 Sep 2013 13:10:04 +0000"  >&lt;p&gt;Alexey,&lt;/p&gt;

&lt;p&gt;Can you respond to Fan Young&apos;s comments in gerrit and maybe we can find a way to move forward with the patch?&lt;/p&gt;</comment>
                            <comment id="68864" author="adilger" created="Fri, 11 Oct 2013 21:20:04 +0000"  >&lt;p&gt;This problem is very similar to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3240&quot; title=&quot;The link count is not updated after the mkdir&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3240&quot;&gt;&lt;del&gt;LU-3240&lt;/del&gt;&lt;/a&gt; and will be fixed by the patch on that bug.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="18608">LU-3240</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzvzi7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9968</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>