<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:46:03 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-11685] removing file names and freeing inodes are not atomic on the OST</title>
                <link>https://jira.whamcloud.com/browse/LU-11685</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Destroying objects on OSTs from ldiskfs layout POV includes removing them from their directories and freeing their inodes. Since in ext4 they are usually performed in different jbd2 transactions, the first part in ext4 also links the inode to the orphan list. However, in Lustre 2.11 and master there are two different transactions and no orphan list linkage between them.&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;
           &amp;lt;...&amp;gt;-112262 [000] .... 37386.078026: ldiskfs_free_inode &amp;lt;-ldiskfs_evict_inode
           &amp;lt;...&amp;gt;-112262 [000] .... 37386.078050: &amp;lt;stack trace&amp;gt;
 =&amp;gt; evict
 =&amp;gt; iput
 =&amp;gt; osd_object_delete
 =&amp;gt; lu_object_free.isra.30
 =&amp;gt; lu_object_put
 =&amp;gt; ofd_destroy_by_fid
 =&amp;gt; ofd_destroy_hdl
 =&amp;gt; tgt_request_handle
 =&amp;gt; ptlrpc_server_handle_request
 =&amp;gt; ptlrpc_main
 =&amp;gt; kthread
 =&amp;gt; ret_from_fork&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The issue can be easily reproduced by forcing transaction commit between those two and crashing the system:&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;
diff --git a/lustre/ofd/ofd_objects.c b/lustre/ofd/ofd_objects.c
index 7605de4..f973923 100644
--- a/lustre/ofd/ofd_objects.c
+++ b/lustre/ofd/ofd_objects.c
@@ -876,6 +876,11 @@ stop:
                rc = rc2;
 unlock:
        ofd_write_unlock(env, fo);
+
+       set_current_state(TASK_UNINTERRUPTIBLE);
+       schedule_timeout(msecs_to_jiffies(MSEC_PER_SEC * 6));
+       BUG();
+
        RETURN(rc);
 }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;e2fsck finds inconsistency on the OST image:&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;
[root@panda-vbox lustre-release]# e2fsck -f /dev/sdd
e2fsck 1.42.13.wc6 (05-Feb-2017)
lustre-OST0000: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 134 has zero dtime.  Fix&amp;lt;y&amp;gt;? yes &amp;lt;==============
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (80310, counted=79979).
Fix&amp;lt;y&amp;gt;? yes
Inode bitmap differences:  -134
Fix&amp;lt;y&amp;gt;? yes
Free inodes count wrong &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; group #0 (24835, counted=24836).
Fix&amp;lt;y&amp;gt;? yes
Free inodes count wrong (99987, counted=99668).
Fix&amp;lt;y&amp;gt;? yes
[QUOTA WARNING] Usage inconsistent &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ID 0:actual (1392640, 323) != expected (1392640, 324)
Update quota info &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; quota type 0&amp;lt;y&amp;gt;? yes
[QUOTA WARNING] Usage inconsistent &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ID 0:actual (1392640, 323) != expected (1392640, 324)
Update quota info &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; quota type 1&amp;lt;y&amp;gt;? yes

lustre-OST0000: ***** FILE SYSTEM WAS MODIFIED *****
lustre-OST0000: 332/100000 files (0.3% non-contiguous), 20021/100000 blocks
[root@panda-vbox lustre-release]#
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Before suggesting a patch, I&apos;d like to discuss possible solutions. Should we try extending the transaction so as to include the final iput? Should we use any other approach?&lt;/p&gt;</description>
                <environment></environment>
        <key id="54075">LU-11685</key>
            <summary>removing file names and freeing inodes are not atomic on the OST</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="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="panda">Andrew Perepechko</reporter>
                        <labels>
                    </labels>
                <created>Tue, 20 Nov 2018 17:33:15 +0000</created>
                <updated>Fri, 15 Mar 2019 11:13:14 +0000</updated>
                                            <version>Upstream</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="243977" author="panda" created="Fri, 15 Mar 2019 07:30:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt;, possibly, a typo? The nodemap issue looks unrelated.&lt;/p&gt;</comment>
                            <comment id="243982" author="adilger" created="Fri, 15 Mar 2019 09:48:00 +0000"  >&lt;p&gt;I meant to link &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10048&quot; title=&quot;osd-ldiskfs to truncate outside of main transaction&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10048&quot;&gt;&lt;del&gt;LU-10048&lt;/del&gt;&lt;/a&gt; here.&lt;/p&gt;

&lt;p&gt;Alex exported ext4_orphan_add() as part of that patch, which could be used here to avoid this issue.  However, that may have a performance impact that we don&apos;t want.&lt;/p&gt;

&lt;p&gt;An initial patch was proposed to ext4 to multi-thread the orphan list along with further discussion on how to make that patch better at:&lt;br/&gt;
&lt;a href=&quot;https://patchwork.ozlabs.org/patch/461805&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://patchwork.ozlabs.org/patch/461805&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="243983" author="panda" created="Fri, 15 Mar 2019 10:01:05 +0000"  >&lt;p&gt;Thank you!&lt;/p&gt;</comment>
                            <comment id="243986" author="bzzz" created="Fri, 15 Mar 2019 11:13:14 +0000"  >&lt;p&gt;I have a patch calling ext4_orphan_add() as ext4 does, but wasn&apos;t sure about performance impact as well.&lt;br/&gt;
my thought was that on OST we don&apos;t care that much about destroy rate while on MDT most of regular files are empty and we could call ldiskfs_delete_inode() directly.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="48520">LU-10048</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|i006on:</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>