<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:53:19 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-12521] print_instance() incorrect if fsname contains a dash</title>
                <link>https://jira.whamcloud.com/browse/LU-12521</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;As discussed on &lt;a href=&quot;https://review.whamcloud.com/#/c/35320/5/lustre/utils/liblustreapi.c@1683&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;gerrit comments&lt;/a&gt;, llapi_getname() is hard to use.&lt;/p&gt;

&lt;p&gt;v2_12_0-RC3-2-gcd294a1255 added this comment that explains the problem:&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-c&quot;&gt;
/*
 * We want to turn testfs-clilov-ffff88002738bc00 into
 * testfs-ffff88002738bc00 in a portable way that doesn&apos;t depend
 * on what is after &lt;span class=&quot;code-quote-red&quot;&gt;&quot;-clilov-&quot;&lt;/span&gt; as it may change in the future.
 * Unfortunately, the &lt;span class=&quot;code-quote-red&quot;&gt;&quot;fsname&quot;&lt;/span&gt; part may contain a dash, so we
 * can&apos;t just skip to the first dash, &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; the &lt;span class=&quot;code-quote-red&quot;&gt;&quot;instance&quot;&lt;/span&gt; may be a
 * UUID in the future, so we can&apos;t necessarily go to the last dash.
 */
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;so the string returned by &lt;tt&gt;llapi_getname()&lt;/tt&gt; can contain dashes in the fsname now and might contain dashes in the instance part later on, meaning that users who need either just the fsname or just the instance will be troubled to split the string again if necessary.&lt;/p&gt;

&lt;p&gt;I had misread Andreas&apos; comment as that &lt;tt&gt;llapi_getname()&lt;/tt&gt; was new with  v2_12_53-6-g2a4821b836 and its API could be changed but &lt;tt&gt;llapi_getname()&lt;/tt&gt; itself is fairly old and we probably do not want to change it, so I assume we should at least fix print_instance to use strrchr instead of strchr for now.&lt;/p&gt;

&lt;p&gt;Ideally I&apos;d want some version of llapi_getname where we could add an argument saying we want either one, the other or both informations in the returned string, or maybe have it also return the position of the beginning of the instance so the user could split it themselves if required? But I do not see how to change that cleanly without adding yet another hardly used function, so I do not think this is a good idea anymore.&lt;/p&gt;


&lt;p&gt;Happy to provide a patch either way if you tell me where we want to go, this also is fairly simple.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
&amp;#8211; &lt;br/&gt;
Dominique&lt;/p&gt;</description>
                <environment></environment>
        <key id="56292">LU-12521</key>
            <summary>print_instance() incorrect if fsname contains a dash</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="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="adilger">Andreas Dilger</assignee>
                                    <reporter username="cealustre">CEA</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Jul 2019 15:48:41 +0000</created>
                <updated>Fri, 30 Apr 2021 21:10:00 +0000</updated>
                            <resolved>Thu, 23 Jan 2020 12:01:53 +0000</resolved>
                                                    <fixVersion>Lustre 2.14.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="250840" author="adilger" created="Mon, 8 Jul 2019 17:21:43 +0000"  >&lt;p&gt;Sorry, I thought my patch &lt;tt&gt;v2_12_53-6-g2a4821b836&lt;/tt&gt; added &lt;tt&gt;llapi_getname()&lt;/tt&gt;, but it was only fixing &lt;tt&gt;lfs getname&lt;/tt&gt; and the &lt;tt&gt;llapi_getname()&lt;/tt&gt; interface has been around since &lt;tt&gt;2.1.52-55-g8d935e6d31&lt;/tt&gt;.  It seems the function wasn&apos;t exported from &lt;tt&gt;liblustreapi.h&lt;/tt&gt; until my patch, but I think we shouldn&apos;t change the API and need a new function name instead, like &lt;tt&gt;llapi_get_name_instance()&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="250882" author="martinetd" created="Tue, 9 Jul 2019 08:05:43 +0000"  >&lt;p&gt;I&apos;d rather not add a new function unless we have a way to mark the old one as deprecated and eventually remove it altogether (in e.g. 2.14 or whatever target is appropriate), but I do not see any deprecated attribute or equivalent warning.&lt;/p&gt;

&lt;p&gt;We could certainly make the old function use the new one and keep it around forever but that seems counterproductive in the long term&lt;/p&gt;</comment>
                            <comment id="250920" author="gerrit" created="Tue, 9 Jul 2019 18:57:33 +0000"  >&lt;p&gt;Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/35451&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35451&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12521&quot; title=&quot;print_instance() incorrect if fsname contains a dash&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12521&quot;&gt;&lt;del&gt;LU-12521&lt;/del&gt;&lt;/a&gt; llapi: add separate fsname and instance API&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f8bca0c11962797a7c6431235b55811aa608f89c&lt;/p&gt;</comment>
                            <comment id="250938" author="jgmitter" created="Wed, 10 Jul 2019 14:11:43 +0000"  >&lt;p&gt;Andreas already has a patch for this.&lt;/p&gt;</comment>
                            <comment id="261678" author="gerrit" created="Thu, 23 Jan 2020 05:31:06 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/35451/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35451/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12521&quot; title=&quot;print_instance() incorrect if fsname contains a dash&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12521&quot;&gt;&lt;del&gt;LU-12521&lt;/del&gt;&lt;/a&gt; llapi: add separate fsname and instance API&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 00d14521ca1cd38a5fff82e1639ad3cc944ee13d&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="54334">LU-11803</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56191">LU-12473</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="57754">LU-13118</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="55351">LU-12159</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|i00jc7:</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>