<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:26:04 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-9424] &#8216;lfs getstripe --component-count&#8217; return nothing for non-composite files</title>
                <link>https://jira.whamcloud.com/browse/LU-9424</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I&#8217;ve created several composite and non-composite files:&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;# touch /lustre/scratch/nocomp
# lfs setstripe -E 1M -E 2M -E 3M /lustre/scratch/threecompfile
# lfs setstripe -E 3M /lustre/scratch/onec
# lfs setstripe -E 1m -E 4M /lustre/scratch/twoc
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For non-composite (non-PFL) files, I thought the component count would be 0 or 1, but that&#8217;s not the case. Using &#8216;lfs find &#8211;component-count&#8217;, I know that the component count for the non-composite file, nocomp, is not 0 and not 1:&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;# lfs getstripe --component-count /lustre/scratch/nocomp 
# lfs getstripe --component-count /lustre/scratch/onec 
1
# lfs getstripe --component-count /lustre/scratch/twoc 
2
# lfs getstripe --component-count /lustre/scratch/threecompfile 
3

# lfs find --component-count 0 /lustre/scratch
# lfs find --component-count 1 /lustre/scratch
/lustre/scratch/onec

# lfs find ! --component-count 0 /lustre/scratch
/lustre/scratch
/lustre/scratch/twoc
/lustre/scratch/onec
/lustre/scratch/nocomp
/lustre/scratch/threecompfile

# lfs find ! --component-count 1 /lustre/scratch
/lustre/scratch
/lustre/scratch/twoc
/lustre/scratch/nocomp
/lustre/scratch/threecompfile
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It seems like non-composite files should have a count of 1 or, possibly, 0.&lt;/p&gt;</description>
                <environment></environment>
        <key id="45796">LU-9424</key>
            <summary>&#8216;lfs getstripe --component-count&#8217; return nothing for non-composite files</summary>
                <type id="7" iconUrl="https://jira.whamcloud.com/images/icons/issuetypes/task_agile.png">Technical task</type>
                            <parent id="45517">LU-9349</parent>
                                    <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="niu">Niu Yawei</assignee>
                                    <reporter username="jamesanunez">James Nunez</reporter>
                        <labels>
                            <label>pfl</label>
                    </labels>
                <created>Mon, 1 May 2017 21:36:36 +0000</created>
                <updated>Sat, 3 Jun 2017 04:23:55 +0000</updated>
                            <resolved>Sat, 3 Jun 2017 04:23:55 +0000</resolved>
                                    <version>Lustre 2.10.0</version>
                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="194179" author="pjones" created="Tue, 2 May 2017 17:44:43 +0000"  >&lt;p&gt;Niu&lt;/p&gt;

&lt;p&gt;Could you please assist with this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="194230" author="niu" created="Wed, 3 May 2017 02:30:43 +0000"  >&lt;p&gt;hmm, I think the key problem here is that should we regard non-composite file as component-count=0 file? My original implementation treats them differently, because I don&apos;t think it&apos;s not proper to define the component count of a non-composite file as 0 or 1.&lt;/p&gt;

&lt;p&gt;So component count of a non-composite file is neither 0 nor 1, it should match both &quot;! comp_count=0&quot; and &quot;! comp_count=1&quot;, isn&apos;t it?&lt;/p&gt;</comment>
                            <comment id="194447" author="adilger" created="Thu, 4 May 2017 14:26:14 +0000"  >&lt;p&gt;I think that the command needs to return &lt;em&gt;something&lt;/em&gt; in this case, otherwise it makes it difficult to write a script which handles the results. Returning a component count of &quot;0&quot; makes sense to me, since it is not a composite file and it has no (zero) components.&lt;/p&gt;</comment>
                            <comment id="194596" author="niu" created="Fri, 5 May 2017 00:36:08 +0000"  >&lt;p&gt;Then what about --component-id, --component-flags, etc? Should we return error message when user try to use component options for a non-composite file? A side effect of returning error message is it will interfere the output parsing for a mixed options getstripe (when user perform getstripe with mixed options to a set of files) &lt;/p&gt;</comment>
                            <comment id="194707" author="adilger" created="Fri, 5 May 2017 17:04:30 +0000"  >&lt;p&gt;I would be ok to return 0 for component ID (which is invalid for composite files), and 0 for component flags (since no flags are set). Returning 0 for component count is also a simple way for scripts to know that this is not a composite file, if they want to scan the filesystem for non-PFL files. &lt;/p&gt;</comment>
                            <comment id="194775" author="niu" created="Mon, 8 May 2017 01:44:21 +0000"  >&lt;p&gt;Is this change going to be limited in the output of &apos;lfs getstripe&apos; or are we going to update &apos;lfs find&apos; as well?&lt;/p&gt;

&lt;p&gt;We need some extra effort if the &apos;lfs find&apos; is going to be updated as well, for example, if someone try to find component count &amp;lt; 5 files by &apos;lfs find --component-count=-5&apos;, should the plain file (with component-count=0) being matched? I think it&apos;s reasonable to match plain file for such kind of &apos;find&apos; if we regard plain as kind of single component file (with comp_cnt=1, comp_id=0, comp_flags=init,  comp_start=0, comp_end=eof), and it could be differentiated with real single component file by comp_id=0.&lt;/p&gt;

&lt;p&gt;Another problem is that &apos;lfs getstripe --component-xxx=optional_args&apos; may print nothing as well (when no component satisfy criterion), should we print an error message or just leave it as-is? I prefer to keep it as-is.&lt;/p&gt;</comment>
                            <comment id="195000" author="niu" created="Tue, 9 May 2017 03:21:33 +0000"  >&lt;p&gt;I think current candidate solutions are:&lt;br/&gt;
1. &apos;lfs getstripe&apos; display comp_count=0, comp_id=0, comp_flags=0, comp_start=0, comp_end=0 (or eof?), and keep &apos;lfs find&apos; not matching plain file on comp options.&lt;br/&gt;
2. &apos;lfs getstripe&apos; display comp_count=0, comp_id=0, comp_flags=0, comp_start=0, comp_end=0 (or eof?), and change &apos;lfs find&apos; to match plain file on comp options.&lt;br/&gt;
3. &apos;lfs getstripe&apos; display comp_count=1, comp_id=0, comp_flags=0, comp_start=0, comp_end=eof, and keep &apos;lfs find&apos; not matching plain file on comp options.&lt;br/&gt;
4. &apos;lfs getstripe&apos; display comp_count=1, comp_id=0, comp_flags=0, comp_start=0, comp_end=eof, and change &apos;lfs find&apos; to match plain file on comp options.&lt;br/&gt;
5. &apos;lfs getstripe&apos; display nothing for comp options, and &apos;lfs find&apos; doesn&apos;t match plain file on comp options. (current behavior)&lt;/p&gt;

&lt;p&gt;Andreas, Bobi, which one do you prefer? I prefer 4 or 5.&lt;/p&gt;</comment>
                            <comment id="195001" author="bobijam" created="Tue, 9 May 2017 03:30:58 +0000"  >&lt;p&gt;I vote 4.&lt;/p&gt;</comment>
                            <comment id="195281" author="adilger" created="Wed, 10 May 2017 16:16:02 +0000"  >&lt;p&gt;My first preference would be #1 with &lt;tt&gt;comp_end=eof&lt;/tt&gt;, but second choice would be #4. &lt;/p&gt;</comment>
                            <comment id="195283" author="jhammond" created="Wed, 10 May 2017 16:22:55 +0000"  >&lt;p&gt;I vote 4.&lt;/p&gt;</comment>
                            <comment id="195290" author="jay" created="Wed, 10 May 2017 16:48:58 +0000"  >&lt;p&gt;I vote 4. The reason is that non-PFL file should be handled exactly the same way as single component PFL file.&lt;/p&gt;</comment>
                            <comment id="195426" author="gerrit" created="Thu, 11 May 2017 07:50:21 +0000"  >&lt;p&gt;Niu Yawei (yawei.niu@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/27060&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/27060&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9424&quot; title=&quot;&#8216;lfs getstripe --component-count&#8217; return nothing for non-composite files&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9424&quot;&gt;&lt;del&gt;LU-9424&lt;/del&gt;&lt;/a&gt; tools: v1/v3 as composite layout&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 5cdb8dc668ea4e2aaac833d4155a91db2b9dab04&lt;/p&gt;</comment>
                            <comment id="198001" author="gerrit" created="Sat, 3 Jun 2017 03:55:57 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/27060/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/27060/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9424&quot; title=&quot;&#8216;lfs getstripe --component-count&#8217; return nothing for non-composite files&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9424&quot;&gt;&lt;del&gt;LU-9424&lt;/del&gt;&lt;/a&gt; tools: v1/v3 as composite layout&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 013baaa0ccac4a1e376081c604f5daacf828bfea&lt;/p&gt;</comment>
                            <comment id="198036" author="pjones" created="Sat, 3 Jun 2017 04:23:55 +0000"  >&lt;p&gt;Landed for 2.10&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="45565">LU-9362</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="45517">LU-9349</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|hzzbjz:</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>