<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:51:16 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-5411] cfs_hlist_for_each_entry() not working as intended</title>
                <link>https://jira.whamcloud.com/browse/LU-5411</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When HAVE_HLIST_FOR_EACH_3ARG is defined, cfs_hlist_for_each_entry_safe (and similarly cfs_hlist_for_each_entry) are defined as this:&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;        pos = NULL; hlist_for_each_entry_safe(tpos, n, head, member)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However if we have some code like:&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;            for (i = 0; i &amp;lt; REMOTE_PERM_HASHSIZE; i++)
                    cfs_hlist_for_each_entry_safe(lrp, node, next, hash + i,
                                                  lrp_list)
                            free_ll_remote_perm(lrp);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;  

&lt;p&gt; we end up actually doing:&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;  
            for (i = 0; i &amp;lt; REMOTE_PERM_HASHSIZE; i++)
                pos = NULL;
            hlist_for_each_entry_safe(lrp, node, next, hash + i, lrp_list)
                            free_ll_remote_perm(lrp);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;which is probably not what was intended.&lt;/p&gt;

&lt;p&gt;pos = NULL can be safely removed since it&apos;s an internal cursor. However that will generate some &quot;unused&quot; warnings on platforms where HAVE_HLIST_FOR_EACH_3ARG is defined.&lt;/p&gt;

&lt;p&gt;The other option is to add braces around the call, such as:&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;  
            for (i = 0; i &amp;lt; REMOTE_PERM_HASHSIZE; i++) {
                    cfs_hlist_for_each_entry_safe(lrp, node, next, hash + i,
                                                  lrp_list)
                            free_ll_remote_perm(lrp);
            }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;However that won&apos;t prevent a similar bug from being introduced in the future.&lt;/p&gt;
</description>
                <environment></environment>
        <key id="25738">LU-5411</key>
            <summary>cfs_hlist_for_each_entry() not working as intended</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="3">Duplicate</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="fzago">Frank Zago</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 Jul 2014 20:24:21 +0000</created>
                <updated>Mon, 8 Sep 2014 15:10:38 +0000</updated>
                            <resolved>Mon, 8 Sep 2014 15:09:51 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="90009" author="simmonsja" created="Thu, 24 Jul 2014 21:52:48 +0000"  >&lt;p&gt;Discovering this during your SLES12 testing &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Be aware some other patches are floating around to clean up hlist handling  that might conflict with what you want to do. Looking at my patches your cleanup idea only conflicts with 2 patches, &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#/c/10387&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/10387&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/#/c/11005&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11005&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Patch 103887 needs to be rebased but I was waiting until patch 11005 lands first. Perhaps we can roll your changes into the 10387 patches after 11005 lands. My other patches for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3963&quot; title=&quot;cleanup libcfs wrappers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3963&quot;&gt;&lt;del&gt;LU-3963&lt;/del&gt;&lt;/a&gt; don&apos;t look like they will conflict. Outside those patches the files needed to be updated with your change are:&lt;/p&gt;

&lt;p&gt;lustre/obdclass/capa.c&lt;br/&gt;
luste/llite/remote_perm.c&lt;br/&gt;
lustre/ptlrpc/gss/gss_pipefs.c&lt;br/&gt;
luste/ptlrpc/gss/gss_keyring.c&lt;/p&gt;

&lt;p&gt;We will need to coordinate our work in some way.&lt;/p&gt;</comment>
                            <comment id="90010" author="simmonsja" created="Thu, 24 Jul 2014 22:12:21 +0000"  >&lt;p&gt;Your bracket idea is not working.&lt;/p&gt;

&lt;p&gt;/usr/src/kernels/3.12.22/arch/x86/Makefile:113: CONFIG_X86_X32 enabled but no binutils support&lt;br/&gt;
  CC &lt;span class=&quot;error&quot;&gt;&amp;#91;M&amp;#93;&lt;/span&gt;  /chexport/users/jsimmons/lustre-2.6.50/lustre/llite/remote_perm.o&lt;br/&gt;
cc1: warnings being treated as errors&lt;br/&gt;
/chexport/users/jsimmons/lustre-2.6.50/lustre/llite/remote_perm.c: In function &apos;free_rmtperm_hash&apos;:&lt;br/&gt;
/chexport/users/jsimmons/lustre-2.6.50/lustre/llite/remote_perm.c:102: error: unused variable &apos;node&apos;&lt;/p&gt;

&lt;p&gt;I think it will need a more complex solution. Thinking...&lt;/p&gt;</comment>
                            <comment id="90011" author="fzago" created="Thu, 24 Jul 2014 22:17:45 +0000"  >&lt;p&gt;A bit ugly, but the unused attribute could be used:&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; cfs_hlist_node_t *pos __attribute__ ((unused));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="90013" author="simmonsja" created="Thu, 24 Jul 2014 22:45:19 +0000"  >&lt;p&gt;Very gcc specific. Perhaps we could do a pragma equivalent.&lt;/p&gt;</comment>
                            <comment id="90014" author="fzago" created="Thu, 24 Jul 2014 22:49:38 +0000"  >&lt;p&gt;It&apos;s supported by clang too, and probably (Intel&apos;s) icc.&lt;/p&gt;</comment>
                            <comment id="90015" author="simmonsja" created="Thu, 24 Jul 2014 23:15:26 +0000"  >&lt;p&gt;Been looking at how linux has this to make it compatible. It appears they have a macro to handle this across different compilers. We should use __maybe_unused instead.&lt;/p&gt;</comment>
                            <comment id="93422" author="simmonsja" created="Mon, 8 Sep 2014 14:58:37 +0000"  >&lt;p&gt;Patch &lt;a href=&quot;http://review.whamcloud.com/#/c/11005&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/11005&lt;/a&gt; which has been merged has resolved these issues. This ticket can be closed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="20979">LU-3963</issuekey>
        </issuelink>
                            </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|hzws93:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>15052</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>