<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:51:15 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-5409] add OBD_FAULT_CHECK</title>
                <link>https://jira.whamcloud.com/browse/LU-5409</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be good to have a variant of the existing OBD_FAIL_CHECK() macro that was designed specifically for randomized fault injection. It&apos;s possible that what I want can be accommodated by what we have now but I suspect that it can&apos;t. On issue is that not all OBD_FAIL_XXX locations are suitable for randomized fault injection. Because of this we cannot grep for OBD_FAIL_XXX from obd_support.h and inject them in turn during various workloads.&lt;/p&gt;

&lt;p&gt;Here&apos;s what I want:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;OBD_FAULT_CHECK() should accept existing fail locs.&lt;/li&gt;
	&lt;li&gt;If OBD_FAIL_CHECK(loc) returns true then so should OBD_FAULT_CHECK(loc).&lt;/li&gt;
	&lt;li&gt;If a given location is deemed good for randomized fault injection then we just replace OBD_FAIL_CHECK() with OBD_FAULT_CHECK() and we&apos;re good.&lt;/li&gt;
	&lt;li&gt;OBD_FAULT_CHECK() should also be triggered by setting CFS_FAULT (0x02000000) in cfs_fail_loc. This allows randomly triggering any site that uses OBD_FAULT_CHECK().&lt;/li&gt;
	&lt;li&gt;We should expect (enforce) that triggered OBD_FAULT_CHECKs be recovered from.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;It may be worthwhile to add a cfs_fail_err for use with OBD_{FAIL,FAULT}_CHECK().&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;extern &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; cfs_fail_err;

&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; dt_declare_bankruptcy(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, ...)
{
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (OBD_FAULT_CHECK(OBD_FAIL_DT_DECLARE_BANKRUPTCY))
                RETURN(cfs_fail_err)

        ...
}

void *lu_alloc_gater(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, ...)
{
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (OBD_FAULT_CHECK(OBD_FAIL_LU_ALLOC_GATER))
                RETURN(ERR_PTR(cfs_fail_err));

        ...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I welcome any suggestions here.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25736">LU-5409</key>
            <summary>add OBD_FAULT_CHECK</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>fault</label>
                    </labels>
                <created>Thu, 24 Jul 2014 18:44:19 +0000</created>
                <updated>Wed, 15 Jul 2015 14:11:55 +0000</updated>
                            <resolved>Mon, 27 Apr 2015 20:36:16 +0000</resolved>
                                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="90281" author="jhammond" created="Tue, 29 Jul 2014 13:48:57 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/#/c/11263/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11263/&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="91068" author="fzago" created="Thu, 7 Aug 2014 17:42:09 +0000"  >&lt;p&gt;This new patch prevents compilation on centos 6.5:&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;make[3]: Entering directory `/root/rpmbuild/BUILD/kernel-2.6.32.431.5.1.el6_lustre&apos;
  CC [M]  /root/lustre-cleanup/lustre/osd-ldiskfs/osd_handler.o
In file included from /root/lustre-cleanup/lustre/include/lu_target.h:40,
                 from /root/lustre-cleanup/lustre/include/obd.h:57,
                 from /root/lustre-cleanup/lustre/osd-ldiskfs/osd_internal.h:61,
                 from /root/lustre-cleanup/lustre/osd-ldiskfs/osd_handler.c:68:
/root/lustre-cleanup/lustre/include/dt_object.h: In function &#8216;dt_declare_create&#8217;:
/root/lustre-cleanup/lustre/include/dt_object.h:1071: error: &#8216;OBD_FAIL_DT_DECLARE_CREATE&#8217; undeclared (first use in this function)
/root/lustre-cleanup/lustre/include/dt_object.h:1071: error: (Each undeclared identifier is reported only once
/root/lustre-cleanup/lustre/include/dt_object.h:1071: error: for each function it appears in.)
/root/lustre-cleanup/lustre/include/dt_object.h: In function &#8216;dt_create&#8217;:
/root/lustre-cleanup/lustre/include/dt_object.h:1088: error: &#8216;OBD_FAIL_DT_CREATE&#8217; undeclared (first use in this function)
.....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Reverting the patch fixes the issue.&lt;/p&gt;</comment>
                            <comment id="91082" author="fzago" created="Thu, 7 Aug 2014 18:57:03 +0000"  >&lt;p&gt;Never mind that. I had a copy of old obd_support.h lying in lustre&apos;s root.&lt;/p&gt;</comment>
                            <comment id="92036" author="jlevi" created="Wed, 20 Aug 2014 12:53:56 +0000"  >&lt;p&gt;Reopening to add label&lt;/p&gt;</comment>
                    </comments>
                    <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|hzws8n:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15050</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>