<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:00:18 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-6446] Warn-on in ldiskfs_orphan_add/del</title>
                <link>https://jira.whamcloud.com/browse/LU-6446</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Testing on RHEL7.1 kernel servers, I see this warning in the dmesg:&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;[ 2083.721470] ------------[ cut here ]------------
[ 2083.721664] WARNING: at /home/green/git/lustre-release/ldiskfs/namei.c:3167 ldiskfs_orphan_add+0x11e/0x280 [ldiskfs]()
[ 2083.721992] Modules linked in: lustre(OF) ofd(OF) osp(OF) lod(OF) ost(OF) mdt(OF) mdd(OF) mgs(OF) osd_ldiskfs(OF) ldiskfs(OF) lquota(OF) lfsck(OF) obdecho(OF) mgc(OF) lov(OF) osc(OF) mdc(OF) lmv(OF) fid(OF) fld(OF) ptlrpc(OF) obdclass(OF) ksocklnd(OF) lnet(OF) libcfs(OF) ext4(F) loop(F) mbcache(F) jbd2(F) sha512_generic(F) rpcsec_gss_krb5(F) ata_generic(F) pata_acpi(F) ttm(F) drm_kms_helper(F) drm(F) ata_piix(F) i2c_piix4(F) virtio_blk(F) serio_raw(F) virtio_balloon(F) libata(F) pcspkr(F) floppy(F) i2c_core(F) virtio_console(F) [last unloaded: libcfs]
[ 2083.723513] CPU: 4 PID: 8690 Comm: ll_ost_io01_002 Tainted: GF       W  O--------------   3.10.0-debug #5
[ 2083.723827] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 2083.723997]  0000000000000000 000000001b75d70c ffff88002193fa60 ffffffff816ccb68
[ 2083.724317]  ffff88002193fa98 ffffffff81070efb ffff8800707419f8 0000000000000000
[ 2083.724627]  ffff880046645800 ffff8800a72affa0 ffff880046644800 ffff88002193faa8
[ 2083.724934] Call Trace:
[ 2083.725080]  [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
[ 2083.725247]  [&amp;lt;ffffffff81070efb&amp;gt;] warn_slowpath_common+0x6b/0xb0
[ 2083.725421]  [&amp;lt;ffffffff8107104a&amp;gt;] warn_slowpath_null+0x1a/0x20
[ 2083.725599]  [&amp;lt;ffffffffa093d41e&amp;gt;] ldiskfs_orphan_add+0x11e/0x280 [ldiskfs]
[ 2083.725790]  [&amp;lt;ffffffffa096b732&amp;gt;] ? ldiskfs_block_zero_page_range+0x292/0x3e0 [ldiskfs]
[ 2083.726104]  [&amp;lt;ffffffffa096df08&amp;gt;] ldiskfs_truncate+0x1c8/0x430 [ldiskfs]
[ 2083.726295]  [&amp;lt;ffffffffa09fde7f&amp;gt;] osd_punch+0x12f/0x5e0 [osd_ldiskfs]
[ 2083.726481]  [&amp;lt;ffffffffa0c601cf&amp;gt;] ofd_object_punch+0x6df/0xc10 [ofd]
[ 2083.726702]  [&amp;lt;ffffffffa0c517b6&amp;gt;] ofd_punch_hdl+0x466/0x9e0 [ofd]
[ 2083.726913]  [&amp;lt;ffffffffa075a3f5&amp;gt;] tgt_request_handle+0x645/0xfe0 [ptlrpc]
[ 2083.727123]  [&amp;lt;ffffffffa070bc31&amp;gt;] ptlrpc_server_handle_request+0x231/0xab0 [ptlrpc]
[ 2083.727434]  [&amp;lt;ffffffffa07097a8&amp;gt;] ? ptlrpc_wait_event+0xb8/0x360 [ptlrpc]
[ 2083.727635]  [&amp;lt;ffffffffa070fb80&amp;gt;] ptlrpc_main+0xae0/0x1ee0 [ptlrpc]
[ 2083.727814]  [&amp;lt;ffffffff816d5b97&amp;gt;] ? _raw_spin_unlock_irq+0x27/0x50
[ 2083.727989]  [&amp;lt;ffffffff816d38be&amp;gt;] ? __schedule+0x2fe/0x810
[ 2083.728182]  [&amp;lt;ffffffffa070f0a0&amp;gt;] ? ptlrpc_register_service+0xf20/0xf20 [ptlrpc]
[ 2083.728475]  [&amp;lt;ffffffff8109c00a&amp;gt;] kthread+0xea/0xf0
[ 2083.728639]  [&amp;lt;ffffffff8109bf20&amp;gt;] ? kthread_create_on_node+0x140/0x140
[ 2083.728819]  [&amp;lt;ffffffff816df2bc&amp;gt;] ret_from_fork+0x7c/0xb0
[ 2083.728986]  [&amp;lt;ffffffff8109bf20&amp;gt;] ? kthread_create_on_node+0x140/0x140
[ 2083.729175] ---[ end trace 44cb2ff8a147856d ]---
[ 2083.729370] ------------[ cut here ]------------
[ 2083.729539] WARNING: at /home/green/git/lustre-release/ldiskfs/namei.c:3249 ldiskfs_orphan_del+0x17d/0x2a0 [ldiskfs]()
[ 2083.729866] Modules linked in: lustre(OF) ofd(OF) osp(OF) lod(OF) ost(OF) mdt(OF) mdd(OF) mgs(OF) osd_ldiskfs(OF) ldiskfs(OF) lquota(OF) lfsck(OF) obdecho(OF) mgc(OF) lov(OF) osc(OF) mdc(OF) lmv(OF) fid(OF) fld(OF) ptlrpc(OF) obdclass(OF) ksocklnd(OF) lnet(OF) libcfs(OF) ext4(F) loop(F) mbcache(F) jbd2(F) sha512_generic(F) rpcsec_gss_krb5(F) ata_generic(F) pata_acpi(F) ttm(F) drm_kms_helper(F) drm(F) ata_piix(F) i2c_piix4(F) virtio_blk(F) serio_raw(F) virtio_balloon(F) libata(F) pcspkr(F) floppy(F) i2c_core(F) virtio_console(F) [last unloaded: libcfs]
[ 2083.731374] CPU: 4 PID: 8690 Comm: ll_ost_io01_002 Tainted: GF       W  O--------------   3.10.0-debug #5
[ 2083.731693] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 2083.731862]  0000000000000000 000000001b75d70c ffff88002193fa50 ffffffff816ccb68
[ 2083.732180]  ffff88002193fa88 ffffffff81070efb ffff8800707419f8 ffff8800707419f8
[ 2083.732488]  ffff8800a72affa0 ffff880046645800 0000000000000000 ffff88002193fa98
[ 2083.732798] Call Trace:
[ 2083.732932]  [&amp;lt;ffffffff816ccb68&amp;gt;] dump_stack+0x19/0x1b
[ 2083.733108]  [&amp;lt;ffffffff81070efb&amp;gt;] warn_slowpath_common+0x6b/0xb0
[ 2083.733282]  [&amp;lt;ffffffff8107104a&amp;gt;] warn_slowpath_null+0x1a/0x20
[ 2083.733456]  [&amp;lt;ffffffffa093e6bd&amp;gt;] ldiskfs_orphan_del+0x17d/0x2a0 [ldiskfs]
[ 2083.733647]  [&amp;lt;ffffffffa096e10b&amp;gt;] ldiskfs_truncate+0x3cb/0x430 [ldiskfs]
[ 2083.733834]  [&amp;lt;ffffffffa09fde7f&amp;gt;] osd_punch+0x12f/0x5e0 [osd_ldiskfs]
[ 2083.734027]  [&amp;lt;ffffffffa0c601cf&amp;gt;] ofd_object_punch+0x6df/0xc10 [ofd]
[ 2083.734208]  [&amp;lt;ffffffffa0c517b6&amp;gt;] ofd_punch_hdl+0x466/0x9e0 [ofd]
[ 2083.734401]  [&amp;lt;ffffffffa075a3f5&amp;gt;] tgt_request_handle+0x645/0xfe0 [ptlrpc]
[ 2083.734604]  [&amp;lt;ffffffffa070bc31&amp;gt;] ptlrpc_server_handle_request+0x231/0xab0 [ptlrpc]
[ 2083.734913]  [&amp;lt;ffffffffa07097a8&amp;gt;] ? ptlrpc_wait_event+0xb8/0x360 [ptlrpc]
[ 2083.735123]  [&amp;lt;ffffffffa070fb80&amp;gt;] ptlrpc_main+0xae0/0x1ee0 [ptlrpc]
[ 2083.735302]  [&amp;lt;ffffffff816d5b97&amp;gt;] ? _raw_spin_unlock_irq+0x27/0x50
[ 2083.735478]  [&amp;lt;ffffffff816d38be&amp;gt;] ? __schedule+0x2fe/0x810
[ 2083.735661]  [&amp;lt;ffffffffa070f0a0&amp;gt;] ? ptlrpc_register_service+0xf20/0xf20 [ptlrpc]
[ 2083.735954]  [&amp;lt;ffffffff8109c00a&amp;gt;] kthread+0xea/0xf0
[ 2083.736127]  [&amp;lt;ffffffff8109bf20&amp;gt;] ? kthread_create_on_node+0x140/0x140
[ 2083.736307]  [&amp;lt;ffffffff816df2bc&amp;gt;] ret_from_fork+0x7c/0xb0
[ 2083.736474]  [&amp;lt;ffffffff8109bf20&amp;gt;] ? kthread_create_on_node+0x140/0x140
[ 2083.736657] ---[ end trace 44cb2ff8a147856e ]---
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The warning in question both times is:&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;        WARN_ON_ONCE(!(inode-&amp;gt;i_state &amp;amp; (I_NEW | I_FREEING)) &amp;amp;&amp;amp;
                     !mutex_is_locked(&amp;amp;inode-&amp;gt;i_mutex));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So I imagine we need some sort of extra semaphore?&lt;/p&gt;</description>
                <environment></environment>
        <key id="29458">LU-6446</key>
            <summary>Warn-on in ldiskfs_orphan_add/del</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="ys">Yang Sheng</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Apr 2015 02:13:09 +0000</created>
                <updated>Fri, 15 Nov 2019 20:51:15 +0000</updated>
                            <resolved>Tue, 28 Jul 2015 00:55:48 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="111920" author="adilger" created="Fri, 10 Apr 2015 17:24:17 +0000"  >&lt;p&gt;It looks like there is a requirement to hold i_mutex when calling &lt;tt&gt;ext4_orphan_add()&lt;/tt&gt; and &lt;tt&gt;ext4_orphan_del()&lt;/tt&gt; because the internal locking has changed to reduce contention on &lt;tt&gt;s_orphan_lock&lt;/tt&gt; (landed upstream in 3.15 but backported to RHEL7.1):&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;commit d745a8c20c1f864c10ca78d0f89219633861b7e9
Author: Jan Kara &amp;lt;jack@suse.cz&amp;gt;
Date:   Mon May 26 11:56:53 2014 -0400

    ext4: reduce contention on s_orphan_lock
    
    Shuffle code around in ext4_orphan_add() and ext4_orphan_del() so that
    we avoid taking global s_orphan_lock in some cases and hold it for
    shorter time in other cases.
    
    Signed-off-by: Jan Kara &amp;lt;jack@suse.cz&amp;gt;
    Signed-off-by: &quot;Theodore Ts&apos;o&quot; &amp;lt;tytso@mit.edu&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;At a minimum, we need to hold &lt;tt&gt;i_mutex&lt;/tt&gt; in &lt;tt&gt;osd_punch()&lt;/tt&gt; around calling &lt;tt&gt;ldiskfs_truncate()&lt;/tt&gt;.  There may be other callpaths that call ext4_orphan_add() or ext4_orphan_del(), but they may be hidden because this is a WARN_ON_ONCE().  They will show up once osd_punch() is fixed.&lt;/p&gt;</comment>
                            <comment id="111990" author="ys" created="Mon, 13 Apr 2015 12:47:23 +0000"  >&lt;p&gt;We did lock i_mutex around ldiskfs_truncate, But it causes a deadlock. (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4252&quot; title=&quot;Failure on test suite racer test_1&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4252&quot;&gt;&lt;del&gt;LU-4252&lt;/del&gt;&lt;/a&gt;) And add a ldiskfs patch to remove some related warning message. Looks like ext4_orphan_add() and ext4_orphan_del() just were called in ldiskfs_truncate in Lustre. &lt;/p&gt;</comment>
                            <comment id="112168" author="bogl" created="Wed, 15 Apr 2015 17:19:39 +0000"  >&lt;p&gt;As Yang Sheng mentioned above holding i_mutex led to deadlocks.  Instead we made a patch for ldiskfs, ext4-remove-truncate-warning.patch, to delete the warning.  A similar patch was later added to the patches for el6.6 when a similar new warning was seen there. Strongly suspect that el7.1 has similar warnings in more places than in el7.0.  We need to either extend the patch to take out more warnings or figure out a way to hold i_mutex without causing deadlocks.&lt;/p&gt;</comment>
                            <comment id="114335" author="gerrit" created="Wed, 6 May 2015 04:24:02 +0000"  >&lt;p&gt;Yang Sheng (yang.sheng@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/14690&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14690&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6446&quot; title=&quot;Warn-on in ldiskfs_orphan_add/del&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6446&quot;&gt;&lt;del&gt;LU-6446&lt;/del&gt;&lt;/a&gt; ldiskfs: remove WARN_ON from ldiskfs_orphan_add&lt;/p&gt;
{del}
&lt;p&gt;Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 34395e31c1a1da84f412f928eacc05a7001d56f3&lt;/p&gt;</comment>
                            <comment id="122306" author="gerrit" created="Mon, 27 Jul 2015 19:03:55 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/14690/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/14690/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6446&quot; title=&quot;Warn-on in ldiskfs_orphan_add/del&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6446&quot;&gt;&lt;del&gt;LU-6446&lt;/del&gt;&lt;/a&gt; ldiskfs: remove WARN_ON from ldiskfs_orphan_add&lt;/p&gt;
{del}
&lt;p&gt;Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3daba43a191a0a2c9358d39b3f48b1b759a41819&lt;/p&gt;</comment>
                            <comment id="122355" author="ys" created="Tue, 28 Jul 2015 00:55:48 +0000"  >&lt;p&gt;Patch landed. Close ticket.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="22014">LU-4252</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="19084">LU-3373</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="57402">LU-12977</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|hzxahz:</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>