<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:16: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-15202] lfs setstripe should check ost offset is valid for pool</title>
                <link>https://jira.whamcloud.com/browse/LU-15202</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When a directory has ost pool set and a change is made to the stripe offset lustre doesn&apos;t check to make sure ost offset is valid. Here for example:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;mkdir creates a directory with PFL.&lt;/li&gt;
	&lt;li&gt;Striping is changed to offset of 0. ( This should error out, because offset of 0 (-i 0 ) is not valid for ssd-pool.&lt;/li&gt;
&lt;/ol&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;
&amp;gt; lfs getstripe -d stripe_test_dir
  lcm_layout_gen:    0
  lcm_mirror_count:  1
  lcm_entry_count:   3
    lcme_id:             N/A
    lcme_mirror_id:      N/A
    lcme_flags:          prefer
    lcme_extent.e_start: 0
    lcme_extent.e_end:   268435456
      stripe_count:  1       stripe_size:   16777216       pattern:       raid0       stripe_offset: -1       pool:          ssd-pool

    lcme_id:             N/A
    lcme_mirror_id:      N/A
    lcme_flags:          prefer
    lcme_extent.e_start: 268435456
    lcme_extent.e_end:   5368709120
      stripe_count:  16       stripe_size:   16777216       pattern:       raid0       stripe_offset: -1       pool:          ssd-pool

    lcme_id:             N/A
    lcme_mirror_id:      N/A
    lcme_flags:          0
    lcme_extent.e_start: 5368709120
    lcme_extent.e_end:   EOF
      stripe_count:  16       stripe_size:   16777216       pattern:       raid0       stripe_offset: -1       pool:          hdd-pool

&amp;gt; lfs setstripe -c 1 -i 0 stripe_test_dir
mhanafi@pfe23:/nobackupp17/mhanafi&amp;gt; lfs getstripe -d stripe_test_dir
stripe_count:  1 stripe_size:   1048576 pattern:       raid0 stripe_offset: 0 pool:          ssd-pool

&amp;gt; touch stripe_test_dir/test
touch: setting times of &lt;span class=&quot;code-quote&quot;&gt;&apos;stripe_test_dir/test&apos;&lt;/span&gt;: No such file or directory
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;lfs setstripe does check ost offset if the pool is passed.&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;
&amp;gt; lfs setstripe -c 1 -i 0 stripe_test_dir -p ssd-pool
lfs setstripe: setstripe error &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;stripe_test_dir&apos;&lt;/span&gt;: Invalid argument

&amp;gt; lfs setstripe -c 1 -i 100 stripe_test_dir -p ssd-pool

&amp;gt; touch stripe_test_dir/test
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="67102">LU-15202</key>
            <summary>lfs setstripe should check ost offset is valid for pool</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="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="pjones">Peter Jones</assignee>
                                    <reporter username="mhanafi">Mahmoud Hanafi</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Nov 2021 16:35:11 +0000</created>
                <updated>Wed, 10 Nov 2021 21:42:38 +0000</updated>
                                            <version>Lustre 2.12.6</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="317895" author="adilger" created="Wed, 10 Nov 2021 17:40:27 +0000"  >&lt;p&gt;Mahmoud, it looks like there are two related issues here:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;the default layout set on the directory contains a specific OST index that is not in the pool that is inherited for that directory&lt;/li&gt;
	&lt;li&gt;checking this OST index during file creation prevents the file from being created&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In general, because default layouts may be stored on arbitrary directories across the filesystem,  it is not possible for there to be a guaranteed coherence between the specified OST index in a default layout and a specified pool. The OSTs that make up a pool may change over time, or an OST may be offline or full at the time a file is created in a directory with a default layout. The file creation &lt;b&gt;should&lt;/b&gt; ignore the invalid OST index at that time, so this is definitely a bug that should be fixed (though it may already be fixed in 2.14, I have to look).&lt;/p&gt;

&lt;p&gt;That said, it is not recommended to specify an explicit OST index for &lt;b&gt;any&lt;/b&gt; layout, as this typically results in imbalanced OSTs and unhappy users. Most often &quot;&lt;tt&gt;-i 0&lt;/tt&gt;&quot; is an error by the user when they really intended &quot;&lt;tt&gt;-i -1&lt;/tt&gt;&quot;, so it is best to not specify the &quot;&lt;tt&gt;-i&lt;/tt&gt;&quot; argument at all in this case.&lt;/p&gt;</comment>
                            <comment id="317929" author="adilger" created="Wed, 10 Nov 2021 21:42:38 +0000"  >&lt;p&gt;I was testing this on my local system, and it looks like the&#160; problem is still present in 2.14.0.&#160; The issue is that the MDS is checking if the OST index is valid for the pool, which is fine if the user specified it directly via &lt;tt&gt;setstripe&lt;/tt&gt; and can do something about it, but should be ignored if the default layout is coming from a default layout on the parent/root directory where it would just confuse users and make them unhappy that they cannot create 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;mdd_dir.c:2601:mdd_create()) Process entered
mdd_object.c:557:mdd_declare_create_object_internal()) Process entered
lod_object.c:5620:lod_declare_create()) Process entered
lod_object.c:5512:lod_declare_striped_create()) Process entered
lod_qos.c:2661:lod_prepare_create()) Process entered
lod_qos.c:2697:lod_prepare_create()) comp[0] 0 [0x0, 0x0)
lod_qos.c:2513:lod_qos_prep_create()) Process entered
lod_qos.c:2564:lod_qos_prep_create()) tgt_count 5 stripe_count 1
lod_qos.c:1266:lod_ost_alloc_specific()) Start index 0 not found in pool &apos;testpool&apos;
lod_qos.c:1267:lod_ost_alloc_specific()) Process leaving via out (rc=18446744073709551594 : -22 : 0xffffffffffffffea)
lod_qos.c:2649:lod_qos_prep_create()) Process leaving (rc=18446744073709551594 : -22 : ffffffffffffffea)
lod_qos.c:2705:lod_prepare_create()) Process leaving (rc=18446744073709551594 : -22 : ffffffffffffffea)
lod_object.c:5521:lod_declare_striped_create()) Process leaving via out (rc=18446744073709551594 : -22 : 0xffffffffffffffea)
lod_object.c:5702:lod_declare_create()) Process leaving (rc=18446744073709551594 : -22 : ffffffffffffffea)
mdd_object.c:577:mdd_declare_create_object_internal()) Process leaving (rc=18446744073709551594 : -22 : ffffffffffffffea)
mdd_dir.c:2161:mdd_declare_create_object()) Process leaving via out (rc=18446744073709551594 : -22 : 0xffffffffffffffea)
mdd_dir.c:2261:mdd_declare_create()) Process leaving via out (rc=18446744073709551594 : -22 : 0xffffffffffffffea)
mdd_dir.c:2678:mdd_create()) Process leaving via out_stop (rc=18446744073709551594 : -22 : 0xffffffffffffffea)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is in contrast to &lt;tt&gt;lod_verify_striping-&amp;gt;lod_verify_v1v3()&lt;/tt&gt; which checks &lt;tt&gt;is_from_disk&lt;/tt&gt; to skip OST index validation when &lt;tt&gt;stripe_offset != LOV_OFFSET_DEFAULT&lt;/tt&gt;.&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|i029hb:</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="10021"><![CDATA[2]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>