<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:25:45 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-9387] Remove function pointers from struct obd_ops</title>
                <link>https://jira.whamcloud.com/browse/LU-9387</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The obd_ops struct&#160;contains a list of function pointers that are used to choose a handler function specialized to the obd type.&#160; The use of function pointers makes the code more difficult to read and debug.&#160; Instead, the correct handler function should be directly called.&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;struct obd_ops {
&#160;&#160;&#160;&#160;&#160;&#160;&#160; struct module *owner;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; int (*iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; void *karg, void __user *uarg);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; int (*get_info)(const struct lu_env *env, struct obd_export *,
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; __u32 keylen, void *key, __u32 *vallen, void *val,
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; struct lov_stripe_md *lsm);
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Example: The function obd_iocontrol calls the function pointer obd_ops-&amp;gt;iocontrol via the OBP macro.&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;static inline int obd_iocontrol(unsigned int cmd, struct obd_export *exp, 
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; int len, void *karg, void __user *uarg)
{
&#160;&#160;&#160;&#160;&#160;&#160;&#160; int rc;

&#160;&#160;&#160;&#160;&#160;&#160;&#160; EXP_CHECK_DT_OP(exp, iocontrol);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; EXP_COUNTER_INCREMENT(exp, iocontrol);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; rc = OBP(exp-&amp;gt;exp_obd, iocontrol)(cmd, exp, len, karg, uarg);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; return rc;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The iocontrol&#160;function pointer and obd_iocontrol() should be removed, and all calls to obd_iocontrol() should be replaced with calls to the appropriate handler function.&lt;font color=&quot;#0066cc&quot;&gt;&lt;/font&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="45660">LU-9387</key>
            <summary>Remove function pointers from struct obd_ops</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="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="sguminsx">Steve Guminski</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Apr 2017 17:33:37 +0000</created>
                <updated>Wed, 13 Feb 2019 07:46:09 +0000</updated>
                                            <version>Lustre 2.10.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                    <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|hzzaxr:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>