<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:31:59 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-17025] Invalid pool name does not return error</title>
                <link>https://jira.whamcloud.com/browse/LU-17025</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Passing invalid striping parameters does not return error. In the below given test case the llapi_file_open_pool did not have right pool name and it did not fail&lt;/p&gt;

&lt;p&gt;Below given is the test case that failed.&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;
&lt;span class=&quot;code-comment&quot;&gt;// compile with:
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// cc llapi_noerr.c -llustreapi
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// This program will produce a file ( ./test_file ) with invalid striping (in particular the pool) without raising an error.
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;//
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// This can be verified with:
&lt;/span&gt;&lt;span class=&quot;code-comment&quot;&gt;// lfs getstripe ./test_file 
&lt;/span&gt;#&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 200809L 
#endif

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;fcntl.h&amp;gt;
#include &amp;lt;lustre/lustreapi.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt; 
#include &amp;lt;string.h&amp;gt;

typedef struct {
   int64_t count;
   int64_t size;
   int64_t offset;
   int64_t pattern; 
   &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *pool;
} lustrestripe; 

void f_get_lov_maxpoolname(int64_t *max) {
   *max = LOV_MAXPOOLNAME;
} 

&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; bool apply_stripe(lustrestripe *stripe_info, &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *filename) {
   &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; mode_t perm = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH; bool success = 0;
   &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; open_return;
   &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *pool; pool = stripe_info-&amp;gt;pool;

   printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;max poolname size = %i\n&quot;&lt;/span&gt;,LOV_MAXPOOLNAME); 
   &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (pool != NULL) { 
     int64_t pool_max_size;
     f_get_lov_maxpoolname(&amp;amp;pool_max_size);
     &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (strnlen(pool, (size_t)pool_max_size) == 0) { 
       pool = NULL; 
     }
   } 

   open_return = llapi_file_open_pool(filename, O_CREAT | O_WRONLY, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)perm, 
            (unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;)stripe_info-&amp;gt;size, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)stripe_info-&amp;gt;offset,
            (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)stripe_info-&amp;gt;count, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)stripe_info-&amp;gt;pattern, pool); 
   printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open_return = %i\n&quot;&lt;/span&gt;,open_return);

   &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (open_return &amp;lt; 0) {
     &lt;span class=&quot;code-comment&quot;&gt;/* Something went wrong. */&lt;/span&gt;
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: ERROR: %s\n&quot;&lt;/span&gt;, strerror(-open_return));  
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: perm: %i\n&quot;&lt;/span&gt;, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)perm); 
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: size: %llu\n&quot;&lt;/span&gt;, (unsigned &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;long&lt;/span&gt;)stripe_info-&amp;gt;size);
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: offset: %i\n&quot;&lt;/span&gt;, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)stripe_info-&amp;gt;offset); 
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: count: %i\n&quot;&lt;/span&gt;, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)stripe_info-&amp;gt;count); 
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: pattern: %i\n&quot;&lt;/span&gt;, (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)stripe_info-&amp;gt;pattern);

     &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (pool == NULL) {
       printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: pool: &amp;lt;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;&amp;gt;\n&quot;&lt;/span&gt;); 
     } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
       printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open: lustreapi_pool: pool: &lt;span class=&quot;code-quote&quot;&gt;&apos;%s&apos;&lt;/span&gt;\n&quot;&lt;/span&gt;, pool); 
     } 
   } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
     &lt;span class=&quot;code-comment&quot;&gt;/* Striping information was set. */&lt;/span&gt; 
     close(open_return); 
     success = 1;
     printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;No error from llapi_file_open_pool()\n&quot;&lt;/span&gt;); 
   } 
  &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; success; 
}

&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; main() {
 bool res; 

 printf(&lt;span class=&quot;code-quote&quot;&gt;&quot;open file with llapi\n&quot;&lt;/span&gt;);

 lustrestripe stripe_parms; 
 stripe_parms.size = 8388608; 
 stripe_parms.offset = -1; 
 stripe_parms.count = 10; 
 stripe_parms.pattern = LOV_PATTERN_RAID0; 
 stripe_parms.pool = calloc(LOV_MAXPOOLNAME,sizeof(&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt;)); snprintf(stripe_parms.pool,LOV_MAXPOOLNAME,&lt;span class=&quot;code-quote&quot;&gt;&quot;stupidpool&quot;&lt;/span&gt;); 

 &lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; *filename = &lt;span class=&quot;code-quote&quot;&gt;&quot;./test_file&quot;&lt;/span&gt;; 
 res = apply_stripe(&amp;amp;stripe_parms, filename);
 free(stripe_parms.pool); &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; (&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;)res; 
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="77406">LU-17025</key>
            <summary>Invalid pool name does not return error</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="rajeevm">Rajeev Mishra</assignee>
                                    <reporter username="rajeevm">Rajeev Mishra</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Aug 2023 15:21:57 +0000</created>
                <updated>Wed, 13 Dec 2023 12:17:48 +0000</updated>
                                            <version>Lustre 2.15.3</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="381999" author="JIRAUSER18604" created="Thu, 10 Aug 2023 15:23:09 +0000"  >&lt;p&gt;Please assign the ticket to me for code push. Thanks&lt;/p&gt;</comment>
                            <comment id="382728" author="gerrit" created="Wed, 16 Aug 2023 19:57:33 +0000"  >&lt;p&gt;&quot;Rajeev Mishra &amp;lt;rajeevm@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51962&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51962&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17025&quot; title=&quot;Invalid pool name does not return error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17025&quot;&gt;LU-17025&lt;/a&gt; test: Ensure pool exist before use&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: c41cf57e9d3f874112654907a19c41333192a8c1&lt;/p&gt;</comment>
                            <comment id="382729" author="gerrit" created="Wed, 16 Aug 2023 19:57:34 +0000"  >&lt;p&gt;&quot;Rajeev Mishra &amp;lt;rajeevm@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51963&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51963&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17025&quot; title=&quot;Invalid pool name does not return error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17025&quot;&gt;LU-17025&lt;/a&gt; llapi: Verify stripe pool name&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: bc0770775c3335661213ae5311bc853b0265e521&lt;/p&gt;</comment>
                            <comment id="396579" author="gerrit" created="Wed, 13 Dec 2023 12:17:48 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51963/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51963/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17025&quot; title=&quot;Invalid pool name does not return error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17025&quot;&gt;LU-17025&lt;/a&gt; llapi: Verify stripe pool name&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: ee7dfc5ad17d322e2e27ea2629c4a2d8e11a3507&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="53008">LU-11264</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_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>llapi_file_open_pool</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i03sr3:</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>
                                                                                                                                                    <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>