<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:30:07 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-16800] Improve Lustre API error reporting</title>
                <link>https://jira.whamcloud.com/browse/LU-16800</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;ul&gt;
	&lt;li&gt;Add rate control of info and error messages&lt;/li&gt;
	&lt;li&gt;Add ability to print file name/function name/line number of where from the message is sourced from&lt;/li&gt;
	&lt;li&gt;Eliminate the split of one message on a number printfs(). Such split may cause one error message be separated on multiple distanced lines in the log in multithread application&lt;/li&gt;
	&lt;li&gt;Fix this code:&lt;br/&gt;
lustre\utils\liblustreapi.c : error_callback_default()&lt;/li&gt;
&lt;/ul&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;
	/*
		 * Remove trailing linefeed so error string can be appended.
		 * @fmt is a &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; string, so we can&apos;t modify it directly.
		 */
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (has_nl &amp;amp;&amp;amp; (newfmt = strdup(fmt)))
			*strrchr(newfmt, &lt;span class=&quot;code-quote&quot;&gt;&apos;\n&apos;&lt;/span&gt;) = &lt;span class=&quot;code-quote&quot;&gt;&apos;\0&apos;&lt;/span&gt;;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This code trims end of line if the format has more than one &apos;\n&apos;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;We can use &lt;b&gt;level&lt;/b&gt; parameter to pass file/function/line format specifiers.&lt;/p&gt;

&lt;p&gt;Need to review all cases of &lt;b&gt;level&lt;/b&gt; parameter use. Review this code:&lt;/p&gt;

&lt;p&gt;lustre\utils\liblustreapi_hsm.c : &#160;llapi_hsm_log_error()&lt;/p&gt;

&lt;p&gt;&#160;&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;
&#160; &#160; real_level = level &amp;amp; LLAPI_MSG_NO_ERRNO;
&#160; &#160; real_level = real_level &amp;gt; 0 ? level - LLAPI_MSG_NO_ERRNO : level;
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="75936">LU-16800</key>
            <summary>Improve Lustre API error reporting</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="3" iconUrl="https://jira.whamcloud.com/images/icons/statuses/inprogress.png" description="This issue is being actively worked on at the moment by the assignee.">In Progress</status>
                    <statusCategory id="4" key="indeterminate" colorName="inprogress"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="aioffe">Alexandre Ioffe</assignee>
                                    <reporter username="aioffe">Alexandre Ioffe</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 May 2023 18:43:58 +0000</created>
                <updated>Sun, 16 Jul 2023 02:56:02 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="373684" author="JIRAUSER16924" created="Fri, 26 May 2023 21:09:45 +0000"  >&lt;p&gt;To test and demonstrate different aspects of the new error logging API I have integrated it in lamigo/lpurge. This example does not have the rate control.&lt;/p&gt;

&lt;p&gt;Here are samples (subject to further correction as needed):&#160;&lt;/p&gt;

&lt;p&gt;Used macro&lt;/p&gt;

&lt;p&gt;&#160;&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;LLAPI_PRINTF((LLAPI_MSG_DEBUG | LX_PRINTF_OPT), lx_log_prefix, 0, fmt, ##args)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
LLAPI_PRINTF((LLAPI_MSG_INFO | LX_PRINTF_OPT),&#160; lx_log_prefix, 0, fmt, ##args)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
LX_PRINTF_OPT =&#160; LLAPI_MSG_NO_ERRNO | LLAPI_MSG_PREFIX | LLAPI_MSG_SEVERITY | LLAPI_MSG_TIMEOFDAY | LLAPI_MSG_FILE | LLAPI_MSG_LINE&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;lx_log_prefix - custom prefix &quot;testfs-MDT0000&quot;&lt;/p&gt;

&lt;p&gt;&#160;&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;
1685086614.273859 testfs-MDT0000:DEBUG:lamigo.c:3527:sync hot to fast [0x200000401:0x3ff1:0x0]: H: 0/1, P: 1/0, L 1, I 0
1685086594.896799 testfs-MDT0000:DEBUG:lamigo_alr.c:192:keepalive msg from host:&lt;span class=&quot;code-quote&quot;&gt;&apos;ost-centOS8&apos;&lt;/span&gt;
1685086622.056213 testfs-MDT0000:INFO:lamigo.c:3355:received signal 15, exiting
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The same as above, but no LLAPI_MSG_FILE | LLAPI_MSG_LINE&lt;/p&gt;

&lt;p&gt;&#160;&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;
1685127033.955474 testfs-MDT0000:DEBUG:sync hot to fast [0x200000401:0x5:0x0]: H: 0/1, P: 0/1, L 1, I 0&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Backward compatible calls&lt;/b&gt; (prepended by llapi_set_command_name(opt.o_mdtname)&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;. The output is supposedly the same as original:&lt;/p&gt;

&lt;p&gt;&#160;&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;
llapi_error(LLAPI_MSG_INFO, 0, fmt, ##args);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
lamigo testfs-MDT0000: sync hot to fast [0x200000401:0x5:0x0]: H: 0/1, P: 0/1, L 1, I 0 : Success (0)&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
llapi_err_noerrno(LLAPI_MSG_INFO, fmt, ##args);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
lamigo testfs-MDT0000: sync hot to fast [0x200000401:0x5:0x0]: H: 0/1, P: 0/1, L 1, I 0&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
llapi_printf(LLAPI_MSG_INFO, fmt, ##args);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&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;
sync hot to fast [0x200000401:0x5:0x0]: H: 0/1, P: 0/1, L 1, I 0&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="378833" author="JIRAUSER16924" created="Sun, 16 Jul 2023 02:56:02 +0000"  >&lt;p&gt;Review in 6.0&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://review.whamcloud.com/c/ex/lustre-release/+/50859/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/ex/lustre-release/+/50859/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10120">
                    <name>Blocker</name>
                                            <outwardlinks description="is blocking">
                                                        </outwardlinks>
                                                        </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|i03kof:</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>