<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:54:22 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-5770] wrong tx credit calculations in mdd_declare_links_add()</title>
                <link>https://jira.whamcloud.com/browse/LU-5770</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;looking for a reason of &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; kernel BUG at fs/jbd2/transaction.c:1033! &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; in sanityN test 12, I ran a simple debugging code &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/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c
index 0da56c0..59efd5b 100644
--- a/lustre/osd-ldiskfs/osd_handler.c
+++ b/lustre/osd-ldiskfs/osd_handler.c
@@ -2988,6 +2988,8 @@ &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; osd_declare_xattr_set(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env,
                        credits *= (buf-&amp;gt;lb_len + sb-&amp;gt;s_blocksize - 1) &amp;gt;&amp;gt;
                                        sb-&amp;gt;s_blocksize_bits;
                }
+               &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (buf) 
+                       printk(&lt;span class=&quot;code-quote&quot;&gt;&quot;osd_declare_xattr_set: buflen = %ld\n&quot;&lt;/span&gt;, buf-&amp;gt;lb_len);
                /*
                 * xattr set may involve inode quota change, reserve credits &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;
                 * dquot_initialize()
@@ -3071,6 +3073,8 @@ &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; osd_xattr_set(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, struct dt_object *dt,
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc != 0)
                        RETURN(rc);
        }
+       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (buf) 
+               printk(&lt;span class=&quot;code-quote&quot;&gt;&quot;osd_xattr_set: buflen = %ld\n&quot;&lt;/span&gt;, buf-&amp;gt;lb_len);
 
        rc = __osd_xattr_set(info, inode, name, buf-&amp;gt;lb_buf, buf-&amp;gt;lb_len,
                               fs_flags);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;got the  following output:&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;osd_xattr_set: buflen = 256280
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256310
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256340
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256370
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256400
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256430
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256460
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256490
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256520
osd_declare_xattr_set: buflen = 4096
osd_xattr_set: buflen = 256550
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;from&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;REFORMAT=y MDSSIZE=400000 ONLY=12 LDISKFS_MKFS_OPTS=&quot;-O large_xattr&quot; sh sanityn.sh
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;mdd_declare_links_add() always uses DEFAULT_LINKEA_SIZE (4096) because linkea_data not yet initialised at the moment of mdd_declare_links_add() call. With really large LinkEA the difference between allocated and used transaction credits can cause that kernel BUG() in jbd2 code.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="27098">LU-5770</key>
            <summary>wrong tx credit calculations in mdd_declare_links_add()</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="bzzz">Alex Zhuravlev</assignee>
                                    <reporter username="zam">Alexander Zarochentsev</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Mon, 20 Oct 2014 09:00:05 +0000</created>
                <updated>Sun, 31 Jul 2016 14:01:38 +0000</updated>
                            <resolved>Fri, 30 Oct 2015 19:14:13 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                    <version>Lustre 2.5.1</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="97365" author="zam" created="Fri, 24 Oct 2014 03:48:15 +0000"  >&lt;p&gt;patch &lt;a href=&quot;http://review.whamcloud.com/#/c/12412/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/12412/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="132173" author="gerrit" created="Fri, 30 Oct 2015 16:42:47 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/12412/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12412/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5770&quot; title=&quot;wrong tx credit calculations in mdd_declare_links_add()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5770&quot;&gt;&lt;del&gt;LU-5770&lt;/del&gt;&lt;/a&gt; osd: find bufsize in declare_xattr_set&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: f6e7cc6d3a640e02192096584f4c6625b99e4678&lt;/p&gt;</comment>
                            <comment id="132201" author="jgmitter" created="Fri, 30 Oct 2015 19:14:13 +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>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="32788">LU-7332</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="27187">LU-5794</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|hzwyyv:</customfieldvalue>

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