<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:07:55 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-7325] wrong integer type used for inode number in LargeEA patch</title>
                <link>https://jira.whamcloud.com/browse/LU-7325</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Hitting &quot;LDISKFS-fs error (device md66): ldiskfs_xattr_inode_iget: error while reading EA inode -2147483347&quot; on large MDT volumes with large_xattr feature enabled.&lt;/p&gt;

&lt;p&gt;Recreation:&lt;/p&gt;

&lt;p&gt;1. MDS should have more than 2G inodes&lt;br/&gt;
2. mdt fs should be created with large_xattr flag.&lt;br/&gt;
3. set inode_goal to get higher inode number allocated.&lt;br/&gt;
&lt;tt&gt;# echo 2147483947 &amp;gt; /sys/fs/ldiskfs/md66/inode_goal&lt;/tt&gt;&lt;br/&gt;
3. create a file&lt;br/&gt;
4. start adding hard links to that file&lt;/p&gt;

&lt;p&gt;eventually LdiskFS fails with:&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;[16767.564754] LDISKFS-fs (md66): mounted filesystem with ordered data mode. quota=on. Opts: 
[16773.660132] Lustre: 25226:0:(client.c:1934:ptlrpc_expire_one_request()) @@@ Request sent has timed out for slow reply: [sent 1445001285/real 1445001285]  req@ffff8810232b3080 x1515193580388392/
t0(0) o8-&amp;gt;pinkfs-OST0001-osc-MDT0000@172.18.56.133@o2ib:28/4 lens 400/544 e 0 to 1 dl 1445001290 ref 1 fl Rpc:XN/0/ffffffff rc 0/-1
[17278.157672] LDISKFS-fs error (device md66): ldiskfs_xattr_inode_iget: error while reading EA inode -2147483446
[17278.169053] Aborting journal on device md66-8.
[17278.187860] LDISKFS-fs (md66): Remounting filesystem read-only
[17278.203840] LustreError: 28195:0:(osd_io.c:1690:osd_ldiskfs_write_record()) journal_get_write_access() returned error -30
[17278.216264] LustreError: 28195:0:(osd_handler.c:1105:osd_trans_stop()) Failure in transaction hook: -30
[17278.226941] LustreError: 28195:0:(osd_handler.c:1114:osd_trans_stop()) Failure to stop transaction: -30
[17278.227001] LustreError: 28024:0:(osd_handler.c:914:osd_trans_commit_cb()) transaction @0xffff8807d0b97d80 commit error: 2
[17280.394367] LDISKFS-fs warning (device md66): kmmpd: kmmpd being stopped since filesystem has been remounted as readonly.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>MDT with inode count &amp;gt; 2G</environment>
        <key id="32753">LU-7325</key>
            <summary>wrong integer type used for inode number in LargeEA patch</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</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="adilger">Andreas Dilger</assignee>
                                    <reporter username="zam">Alexander Zarochentsev</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Oct 2015 17:29:04 +0000</created>
                <updated>Fri, 1 Jul 2016 18:49:40 +0000</updated>
                            <resolved>Fri, 30 Oct 2015 19:12:21 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                    <version>Lustre 2.8.0</version>
                    <version>Lustre 2.5.4</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="131029" author="zam" created="Wed, 21 Oct 2015 17:36:34 +0000"  >&lt;p&gt;The culprit was identified as a wrong integer type used in ext4-large-eas.patch :&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;+struct inode *ext4_xattr_inode_iget(struct inode *parent, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ea_ino, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; *err)
+{
+       struct inode *ea_inode = NULL;
+
+       ea_inode = ext4_iget(parent-&amp;gt;i_sb, ea_ino);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ext4_iget() is called with signed integer while ext4_iget() accepts unsigned long inode number.&lt;br/&gt;
Type conversion takes place and the sign bit of singed int gets extended to high 32 bits of unsigned long integer.&lt;/p&gt;

&lt;p&gt;we have a patch but it needs some time to port to all Lustre 2.8 platforms.&lt;/p&gt;</comment>
                            <comment id="131043" author="adilger" created="Wed, 21 Oct 2015 19:57:10 +0000"  >&lt;p&gt;Looks like this bug exists in several places: &lt;tt&gt;ext4_xattr_inode_get()&lt;/tt&gt;, &lt;tt&gt;ext4_xattr_inode_iget()&lt;/tt&gt;, &lt;tt&gt;ext4_xattr_inode_unlink()&lt;/tt&gt;, &lt;tt&gt;ext4_xattr_inode_set()&lt;/tt&gt;, and &lt;tt&gt;ext4_xattr_set_entry()&lt;/tt&gt; (where it declares ea_ino before calling ext4_xattr_inode_set()).&lt;/p&gt;

&lt;p&gt;It isn&apos;t clear whether the right type is __u32 or unsigned long.  All the on-disk ext4 structures use __u32 for inode numbers, but the VFS API uses unsigned long and ext4 might conceivably use a 64-bit value in the future.  I would accept either one. There is also the &lt;tt&gt;xia_inodes[]&lt;/tt&gt; array using &quot;unsigned int&quot; instead of __u32 or &quot;unsigned long&quot;.  That itself isn&apos;t a problem today, but it may as well be made consistent with the rest of the code, as I don&apos;t think the memory usage is a concern (at most the list of large xattr inodes for a single inode, typically only the difference between a 32-byte and a 64-byte allocation).&lt;/p&gt;

&lt;p&gt;We&apos;ve made this a 2.8.0 blocker, so if it speeds things up you could just edit the ext4-large-eas.patch files in place to use __u32 or unsigned long for &lt;tt&gt;ea_ino&lt;/tt&gt; (which is thankfully consistently named throughout the patch), and push the patch to Gerrit for build testing, rather than trying to round up all the different kernels to regenerate the patches.  It appears that these functions are not referenced in other patches (even as context) so there is very little chance of this causing a compile failure, and you would find this out in an hour rather than spending a lot of time trying to track down and build each kernel.&lt;/p&gt;</comment>
                            <comment id="131161" author="gerrit" created="Thu, 22 Oct 2015 13:02:32 +0000"  >&lt;p&gt;Alexander Zarochentsev (alexander_zarochentsev@xyratex.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/16913&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16913&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7325&quot; title=&quot;wrong integer type used for inode number in LargeEA patch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7325&quot;&gt;&lt;del&gt;LU-7325&lt;/del&gt;&lt;/a&gt; ldiskfs: use correct types for inode num&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 3b0057136e7883d507845cef2a5c12732175fb78&lt;/p&gt;</comment>
                            <comment id="131162" author="zam" created="Thu, 22 Oct 2015 13:03:24 +0000"  >&lt;p&gt;patch &lt;a href=&quot;http://review.whamcloud.com/16913&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16913&lt;/a&gt; &lt;/p&gt;</comment>
                            <comment id="132169" author="gerrit" created="Fri, 30 Oct 2015 16:35:43 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/16913/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/16913/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7325&quot; title=&quot;wrong integer type used for inode number in LargeEA patch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7325&quot;&gt;&lt;del&gt;LU-7325&lt;/del&gt;&lt;/a&gt; ldiskfs: use correct types for inode num&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: d630e9f288e96d50791c4d0fd4414337c673d9ea&lt;/p&gt;</comment>
                            <comment id="132200" author="jgmitter" created="Fri, 30 Oct 2015 19:12:21 +0000"  >&lt;p&gt;Landed for 2.8&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </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|hzxr13:</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>