<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:13:06 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-7925] ll_d_iput() can clear i_nlink for an inode in use</title>
                <link>https://jira.whamcloud.com/browse/LU-7925</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;ll_d_iput() can sometimes clear i_nlink for an inode used by a dentry alias in use.&lt;/p&gt;

&lt;p&gt;The dentry can be either for a different path, but hard linked to the same inode. Or it can be a dentry for the same path, but marked invalid/unhashed. The latter can happen with e.g. 3.x kernels that use atomic_open, for which older server do not return MDS_INODELOCK_LOOKUP.&lt;/p&gt;

&lt;p&gt;Spontaneous i_nlink clearing can cause stat(2) return invalid st_nlink, since i_nlink is used to transfer this value. Also, the kernel itself sometimes accesses i_nlink (see do_coredump() for instance).&lt;/p&gt;

&lt;p&gt;The original intent for i_nlink clearing seems to be that unused inodes should be reclaimed instantly so that GFP_NOFS allocations (such as OBD_ALLOC()) would not face OOM. However, this piece of code seems to be either broken or completely wrong.&lt;/p&gt;

&lt;p&gt;Firstly, although clearing nlink does make the VFS reclaim the inode immediately during final iput, there is also a dentry cache. So, in order to reclaim an inode its dentry should be released first. Closing a file will not lead to ll_d_iput(), even a blocking AST only marks dentries invalid and unhashes them. Dentry reclaim would normally happen via GFP_FS&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/warning.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; dentry slab shrink.&lt;/p&gt;

&lt;p&gt;Secondly, just because OBD_ALLOC() uses GFP_NOFS allocation does not mean that dcache shrink cannot happen if there is not enough memory. Slow path allocation wakes up kswapd and continues indefinitely (see should_alloc_retry()) for any allocation request below PAGE_ALLOC_COSTLY_ORDER. And PAGE_ALLOC_COSTLY_ORDER allocation is a separate issue, in many cases not related to running out of memory.&lt;/p&gt;

&lt;p&gt;A test case and a patch that removes find_cbdata functionality completely will be uploaded shortly.&lt;/p&gt;</description>
                <environment></environment>
        <key id="35622">LU-7925</key>
            <summary>ll_d_iput() can clear i_nlink for an inode in use</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="1">Fixed</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Sat, 26 Mar 2016 15:52:12 +0000</created>
                <updated>Thu, 23 Nov 2017 21:32:18 +0000</updated>
                            <resolved>Tue, 6 Dec 2016 15:14:35 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.9.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="146997" author="gerrit" created="Sat, 26 Mar 2016 16:07:11 +0000"  >&lt;p&gt;Andrew Perepechko (andrew.perepechko@seagate.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/19163&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19163&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7925&quot; title=&quot;ll_d_iput() can clear i_nlink for an inode in use&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7925&quot;&gt;&lt;del&gt;LU-7925&lt;/del&gt;&lt;/a&gt; tests: a test case for i_nlink zeroing issue&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 19f447f0ee0c65398a9a15cc34d40e09ad6acf1a&lt;/p&gt;</comment>
                            <comment id="146998" author="gerrit" created="Sat, 26 Mar 2016 16:07:12 +0000"  >&lt;p&gt;Andrew Perepechko (andrew.perepechko@seagate.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/19164&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19164&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7925&quot; title=&quot;ll_d_iput() can clear i_nlink for an inode in use&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7925&quot;&gt;&lt;del&gt;LU-7925&lt;/del&gt;&lt;/a&gt; llite: avoid clearing i_nlink for inodes in use&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: e37285916047f35eb8531b137e959f4f72bba395&lt;/p&gt;</comment>
                            <comment id="148346" author="gerrit" created="Mon, 11 Apr 2016 03:22:06 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/19164/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/19164/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7925&quot; title=&quot;ll_d_iput() can clear i_nlink for an inode in use&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7925&quot;&gt;&lt;del&gt;LU-7925&lt;/del&gt;&lt;/a&gt; llite: avoid clearing i_nlink for inodes in use&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: e6b7abc567ee0a8085e440c91e102d4318575529&lt;/p&gt;</comment>
                            <comment id="176684" author="jgmitter" created="Tue, 6 Dec 2016 15:14:35 +0000"  >&lt;p&gt;Patch landed to master for 2.9.0&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="36028">LU-8003</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="48788">LU-10131</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|hzy5sf:</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>