<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:20:00 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-8724] several llapi functions use opendir() when open() would suffice</title>
                <link>https://jira.whamcloud.com/browse/LU-8724</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;llapi_get_obd_count(), llapi_ostlist(), llapi_quotactl(), llapi_get_connect_flags(), and possibly other llapi functions are using &lt;tt&gt;opendir()&lt;/tt&gt;, &lt;tt&gt;dirfd()&lt;/tt&gt;, and &lt;tt&gt;closedir()&lt;/tt&gt; when &lt;tt&gt;open()&lt;/tt&gt; and &lt;tt&gt;close()&lt;/tt&gt; would suffice.&lt;/p&gt;</description>
                <environment></environment>
        <key id="40792">LU-8724</key>
            <summary>several llapi functions use opendir() when open() would suffice</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="1">Fixed</resolution>
                                        <assignee username="sguminsx">Steve Guminski</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>easy</label>
                            <label>llapi</label>
                    </labels>
                <created>Tue, 18 Oct 2016 21:35:32 +0000</created>
                <updated>Fri, 23 Dec 2016 13:42:53 +0000</updated>
                            <resolved>Fri, 23 Dec 2016 13:42:53 +0000</resolved>
                                    <version>Lustre 2.9.0</version>
                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="175230" author="sguminsx" created="Mon, 28 Nov 2016 18:05:30 +0000"  >&lt;p&gt;I don&apos;t think llapi_ostlist() should be changed, because it uses the opened directory as a parameter to setup_obd_uuid(), which takes a DIR pointer.&lt;/p&gt;</comment>
                            <comment id="175241" author="gerrit" created="Mon, 28 Nov 2016 18:44:45 +0000"  >&lt;p&gt;Steve Guminski (stephenx.guminski@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/23981&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/23981&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8724&quot; title=&quot;several llapi functions use opendir() when open() would suffice&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8724&quot;&gt;&lt;del&gt;LU-8724&lt;/del&gt;&lt;/a&gt; utils: Use open() instead of opendir() with dirfd()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f57b28954e8fff0467e3d7877c003c62cefe768f&lt;/p&gt;</comment>
                            <comment id="175244" author="simmonsja" created="Mon, 28 Nov 2016 18:56:50 +0000"  >&lt;p&gt;While you are at it another issue exist as well with newer platforms. On my Ubuntu 16 system I get the following build issues:&lt;/p&gt;

&lt;p&gt;gcc -DHAVE_CONFIG_H -I. -I../..   -include /usr/src/lustre-2.8.60/undef.h -include /usr/src/lustre-2.8.60/config.h -I/usr/src/lustre-2.8.60/libcfs/include -I/usr/src/lustre-2.8.60/lnet/include -I/usr/src/lustre-2.8.60/lustre/include  -fPIC -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 -g -O2 -Wall -Werror -MT liblustreapi.o -MD -MP -MF .deps/liblustreapi.Tpo -c -o liblustreapi.o liblustreapi.c&lt;br/&gt;
liblustreapi.c: In function &#8216;llapi_get_poollist&#8217;:&lt;br/&gt;
liblustreapi.c:1196:3: error: &#8216;readdir_r&#8217; is deprecated &lt;span class=&quot;error&quot;&gt;&amp;#91;-Werror=deprecated-declarations&amp;#93;&lt;/span&gt;&lt;br/&gt;
   rc = readdir_r(dir, &amp;amp;pool, &amp;amp;cookie);&lt;br/&gt;
   ^~&lt;br/&gt;
In file included from /usr/include/features.h:364:0,&lt;br/&gt;
                 from /usr/include/mntent.h:22,&lt;br/&gt;
                 from liblustreapi.c:44:&lt;br/&gt;
/usr/include/dirent.h:189:12: note: declared here&lt;br/&gt;
 extern int __REDIRECT (readdir_r,&lt;br/&gt;
            ^&lt;br/&gt;
cc1: all warnings being treated as errors&lt;br/&gt;
Makefile:1191: recipe for target &apos;liblustreapi.o&apos; failed&lt;/p&gt;

&lt;p&gt;readdir() is the replacement for this function,&lt;/p&gt;</comment>
                            <comment id="175270" author="jhammond" created="Mon, 28 Nov 2016 20:36:04 +0000"  >&lt;p&gt;&amp;gt; I don&apos;t think llapi_ostlist() should be changed, because it uses the opened directory as a parameter to setup_obd_uuid(), which takes a DIR pointer.&lt;/p&gt;

&lt;p&gt;setup_obd_uuid() only uses the dir parameter as an argument to dirfd(). So its &lt;tt&gt;DIR *dir&lt;/tt&gt; parameter should be replaced with &lt;tt&gt;int fd&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="175272" author="jhammond" created="Mon, 28 Nov 2016 20:39:43 +0000"  >&lt;p&gt;James, please open a new issue.&lt;/p&gt;</comment>
                            <comment id="175276" author="sguminsx" created="Mon, 28 Nov 2016 20:57:56 +0000"  >&lt;p&gt;OK.  setup_obd_uuid() is called elsewhere, so I&apos;ll have to update the other code that will be impacted.  I&apos;ll upload a new patch when those changes are made.&lt;/p&gt;</comment>
                            <comment id="178916" author="gerrit" created="Fri, 23 Dec 2016 05:05:37 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/23981/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/23981/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8724&quot; title=&quot;several llapi functions use opendir() when open() would suffice&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8724&quot;&gt;&lt;del&gt;LU-8724&lt;/del&gt;&lt;/a&gt; utils: Use open() instead of opendir() with dirfd()&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 44b6af40f70cf065e8198b6b438d6c953063d003&lt;/p&gt;</comment>
                            <comment id="178945" author="pjones" created="Fri, 23 Dec 2016 13:42:53 +0000"  >&lt;p&gt;Landed for 2.10&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|hzysfb:</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>