<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:19:32 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-15579] When nfs exports lustre, chmod the strip directory under the strip directory will have a Permission Deny occurs error</title>
                <link>https://jira.whamcloud.com/browse/LU-15579</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;nfs server(lustre client)&#65306;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# lfs getdirstripe test
lmv_stripe_count: 8 lmv_stripe_offset: 0 lmv_hash_type: fnv_1a_64
mdtidx &#160; &#160; &#160; &#160; &#160; FID[seq:oid:ver]
&#160; &#160; &#160;0 &#160; &#160; &#160; &#160; &#160; [0x200000400:0xe:0x0]
&#160; &#160; &#160;1 &#160; &#160; &#160; &#160; &#160; [0x7c0000407:0xe:0x0]
&#160; &#160; &#160;2 &#160; &#160; &#160; &#160; &#160; [0x280000405:0xe:0x0]
&#160; &#160; &#160;3 &#160; &#160; &#160; &#160; &#160; [0x240000405:0xe:0x0]
&#160; &#160; &#160;4 &#160; &#160; &#160; &#160; &#160; [0x340000403:0xe:0x0]
&#160; &#160; &#160;5 &#160; &#160; &#160; &#160; &#160; [0x2c0000405:0xe:0x0]
&#160; &#160; &#160;6 &#160; &#160; &#160; &#160; &#160; [0x380000404:0xe:0x0]
&#160; &#160; &#160;7 &#160; &#160; &#160; &#160; &#160; [0x300000403:0xe:0x0] 

# cd test
# ls
debug
# lfs getdirstripe debug
lmv_stripe_count: 8 lmv_stripe_offset: 0 lmv_hash_type: fnv_1a_64
mdtidx &#160; &#160; &#160; &#160; &#160; FID[seq:oid:ver]
&#160; &#160; &#160;0 &#160; &#160; &#160; &#160; &#160; [0x200000bd0:0x4:0x0]
&#160; &#160; &#160;1 &#160; &#160; &#160; &#160; &#160; [0x7c0000bd1:0x4:0x0]
&#160; &#160; &#160;2 &#160; &#160; &#160; &#160; &#160; [0x280000bd1:0x4:0x0]
&#160; &#160; &#160;3 &#160; &#160; &#160; &#160; &#160; [0x240000bd1:0x4:0x0]
&#160; &#160; &#160;4 &#160; &#160; &#160; &#160; &#160; [0x340000bd1:0x4:0x0]
&#160; &#160; &#160;5 &#160; &#160; &#160; &#160; &#160; [0x2c0000bd2:0x4:0x0]
&#160; &#160; &#160;6 &#160; &#160; &#160; &#160; &#160; [0x380000bd1:0x4:0x0]
&#160; &#160; &#160;7 &#160; &#160; &#160; &#160; &#160; [0x300000bd1:0x4:0x0]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;nfs client:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# cd /mnt/nfs3/test
# ls
debug
# chmod 755 debug
# ls
ls: cannot access debug: Permission denied
ls: reading directory .: Permission denied
debug
# ls
ls: reading directory .: Permission denied&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;When I execute ls in the directory of the nfs server, the nfs client ls can return to normal&lt;/p&gt;

&lt;p&gt;nfs server(lustre client)&#65306;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# pwd
/muzitest/test
# ls
debug&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;nfs client:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
# ls
debug &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I tried to check on the nfs server (lustre client) and found that the parent_fid in ll_dir_get_parent_fid was incorrectly obtained. This function should correctly obtain the fid of the parent directory of debug, but it lacked the fid of debug itself.&lt;/p&gt;

&lt;p&gt;Therefore, I started to investigate the code on the server side and found that the step to return the debug directory fid is in the mdt_raw_lookup function:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.whamcloud.com/secure/attachment/42431/42431_image-2022-02-21-14-39-31-452.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The mdo_lookup call chain is as follows:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
mdt_raw_lookup --&amp;gt; mdd_lookup --&amp;gt; dio_lookup --&amp;gt; lod_lookup --&amp;gt; osd_index_ea_lookup --&amp;gt; osd_ea_lookup_rec&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In the osd_ea_lookup_rec function, I found that the fid is obtained in the osd_get_fid_from_dentry function, and the content of struct ldiskfs_dir_entry_2 *de is filled in osd_ldiskfs_find_entry. But I can&apos;t find the code related to osd_ldiskfs_find_entry in the source code, so I can&apos;t analyze it further.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.whamcloud.com/secure/attachment/42430/42430_image-2022-02-21-14-42-59-753.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="68776">LU-15579</key>
            <summary>When nfs exports lustre, chmod the strip directory under the strip directory will have a Permission Deny occurs error</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="wc-triage">WC Triage</assignee>
                                    <reporter username="jiahaoli">Jiahao Li</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Feb 2022 06:51:04 +0000</created>
                <updated>Mon, 8 Aug 2022 09:34:52 +0000</updated>
                            <resolved>Tue, 22 Mar 2022 14:24:10 +0000</resolved>
                                    <version>Lustre 2.12.4</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="326814" author="laisiyao" created="Mon, 21 Feb 2022 07:54:18 +0000"  >&lt;p&gt;This looks to be a duplicate of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14826&quot; title=&quot;enable striped directory as NFS export&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14826&quot;&gt;&lt;del&gt;LU-14826&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="326839" author="adilger" created="Mon, 21 Feb 2022 18:21:24 +0000"  >&lt;p&gt;This may relate to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15388&quot; title=&quot;Wrong dotdot FID parameter for osd_add_dot_dotdot()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15388&quot;&gt;&lt;del&gt;LU-15388&lt;/del&gt;&lt;/a&gt;.  Could you please test the patch linked to that ticket. Note that you will need to create a new directory in that case so that the parent FID is set correctly. &lt;/p&gt;</comment>
                            <comment id="326852" author="JIRAUSER17209" created="Tue, 22 Feb 2022 02:53:19 +0000"  >&lt;p&gt;I am doing patch adaptation, I will synchronize the final result in time, thank you for your help&lt;/p&gt;</comment>
                            <comment id="326856" author="JIRAUSER17209" created="Tue, 22 Feb 2022 04:59:08 +0000"  >&lt;p&gt;Thanks for the help, after I patched the code according to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15388&quot; title=&quot;Wrong dotdot FID parameter for osd_add_dot_dotdot()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15388&quot;&gt;&lt;del&gt;LU-15388&lt;/del&gt;&lt;/a&gt;, the problem was solved. It is true that the directory needs to be recreated. After the old directory is chmoded, there will still be Permission Deny.&lt;/p&gt;</comment>
                            <comment id="334351" author="JIRAUSER17209" created="Wed, 11 May 2022 04:12:55 +0000"  >&lt;p&gt;Recently in use, I found that it is normal for nfs to export if the path is all striped directories. If the path is single strip -&amp;gt; single strip -&amp;gt; single strip, it will be chmod on the last directory. Trigger the problem of permission deny. This is not appearing before using &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15388&quot; title=&quot;Wrong dotdot FID parameter for osd_add_dot_dotdot()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15388&quot;&gt;&lt;del&gt;LU-15388&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="342886" author="JIRAUSER17209" created="Mon, 8 Aug 2022 09:34:52 +0000"  >&lt;p&gt;The problem was completely solved when I used &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14826&quot; title=&quot;enable striped directory as NFS export&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14826&quot;&gt;&lt;del&gt;LU-14826&lt;/del&gt;&lt;/a&gt; to adapt the 2.12.4 version of lustre.&lt;/p&gt;

&lt;p&gt;Thanks for everyone&apos;s help&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="67698">LU-15388</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="42431" name="image-2022-02-21-14-39-31-452.png" size="243923" author="jiahaoli" created="Mon, 21 Feb 2022 06:39:34 +0000"/>
                            <attachment id="42430" name="image-2022-02-21-14-42-59-753.png" size="350632" author="jiahaoli" created="Mon, 21 Feb 2022 06:43:03 +0000"/>
                    </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_10040" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic</customfieldname>
                        <customfieldvalues>
                                        <label>client</label>
            <label>server</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>client</label>
            <label>mds</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i02ivz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</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>