<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:22:51 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-9053] standardize error code returned by lustreapi</title>
                <link>https://jira.whamcloud.com/browse/LU-9053</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;right now it&apos;s pretty random. Sometimes the APIs return &lt;tt&gt;-errno&lt;/tt&gt;, sometimes they set &lt;tt&gt;errno&lt;/tt&gt; and return -1.&lt;/p&gt;

&lt;p&gt;Typical examples are &lt;tt&gt;llapi_fswap_layouts_grouplock()&lt;/tt&gt; and &lt;tt&gt;llapi_layout_get_by_fd()&lt;/tt&gt;. I would say the funnier one is &lt;tt&gt;llapi_open_by_fid()&lt;/tt&gt; where &lt;tt&gt;llapi_search_mounts()&lt;/tt&gt; return error code but &lt;tt&gt;llapi_open_by_fid()&lt;/tt&gt; itself returns -1 as if the &lt;tt&gt;errno&lt;/tt&gt; has been set.&lt;/p&gt;</description>
                <environment></environment>
        <key id="43351">LU-9053</key>
            <summary>standardize error code returned by lustreapi</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="wc-triage">WC Triage</assignee>
                                    <reporter username="jay">Jinshan Xiong</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Jan 2017 00:32:58 +0000</created>
                <updated>Tue, 31 Jan 2017 05:54:21 +0000</updated>
                            <resolved>Tue, 31 Jan 2017 05:54:15 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="182199" author="adilger" created="Thu, 26 Jan 2017 00:40:53 +0000"  >&lt;p&gt;There was a long discussion about this in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3840&quot; title=&quot;llapi_layout API design discussion&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3840&quot;&gt;&lt;del&gt;LU-3840&lt;/del&gt;&lt;/a&gt;.  The proposal there was to set &lt;tt&gt;errno&lt;/tt&gt; and return -1 to the caller for &lt;tt&gt;llapi_layout_&amp;#42;&lt;/tt&gt; functions, but this doesn&apos;t help with existing functions that return &lt;tt&gt;-errno&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;My thought is that it makes sense to update existing functions to both return &lt;tt&gt;-errno&lt;/tt&gt; and also set &lt;tt&gt;errno&lt;/tt&gt; internally.  Callers can then either check &lt;tt&gt;rc &amp;lt; 0&lt;/tt&gt; and access &lt;tt&gt;errno&lt;/tt&gt;, or continue to use the return code directly.   This gives is a path to move toward a single style of error returns.&lt;/p&gt;</comment>
                            <comment id="182200" author="jay" created="Thu, 26 Jan 2017 00:49:15 +0000"  >&lt;p&gt;Hi Andreas, Which way do you prefer for the new APIs?&lt;/p&gt;</comment>
                            <comment id="182505" author="adilger" created="Sun, 29 Jan 2017 05:30:40 +0000"  >&lt;p&gt;The newer llapi_layout code is using -1 and errno. &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|hzz1rj:</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>