<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:27:29 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-9584] stripe count defaults to 165</title>
                <link>https://jira.whamcloud.com/browse/LU-9584</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The filesystem has 312 OSTs. When creating a file like this&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; lfs setstripe -c -1 testfile2

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Gives only 165 OSTs. This is odd since it is not 160 or 312.&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;lfs getstripe testfile2
testfile2
lmm_stripe_count:   165
lmm_stripe_size:    1048576
lmm_pattern:        1
lmm_layout_gen:     0
lmm_stripe_offset:  68
	obdidx		 objid		 objid		 group
	    68	      67532793	    0x40677f9	             0
....

&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="46422">LU-9584</key>
            <summary>stripe count defaults to 165</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="6">Not a Bug</resolution>
                                        <assignee username="yujian">Jian Yu</assignee>
                                    <reporter username="mhanafi">Mahmoud Hanafi</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Jun 2017 00:02:07 +0000</created>
                <updated>Thu, 29 Jun 2017 13:10:18 +0000</updated>
                            <resolved>Thu, 29 Jun 2017 13:10:18 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="197861" author="adilger" created="Fri, 2 Jun 2017 04:37:11 +0000"  >&lt;p&gt;If you have more than 160 OSTs and want to stripe over all of them, then you need to enable the &quot;ea_inode&quot; feature on the MDS, like:&lt;br/&gt;
[noformat}&lt;br/&gt;
tune2fs -O ea_inode /path/to/MDT&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;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="197882" author="pjones" created="Fri, 2 Jun 2017 12:20:53 +0000"  >&lt;p&gt;Assigning to Jian for any follow on quesitons&lt;/p&gt;</comment>
                            <comment id="198192" author="mhanafi" created="Mon, 5 Jun 2017 20:40:38 +0000"  >&lt;p&gt;if we don&apos;t have ea_inode option why is it 165 shouldn&apos;t be 160&lt;/p&gt;</comment>
                            <comment id="198255" author="yujian" created="Tue, 6 Jun 2017 08:06:06 +0000"  >&lt;p&gt;Hi Mahmoud,&lt;/p&gt;

&lt;p&gt;The maximal possible stripe count is calculated based on max EA size in lod_get_stripecnt():&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;__u16 lod_get_stripecnt(struct lod_device *lod, struct lod_object *lo,
                        __u16 stripe_count)
{
        __u32 max_stripes = LOV_MAX_STRIPE_COUNT_OLD;
        ......
        &lt;span class=&quot;code-comment&quot;&gt;/* stripe count is based on whether OSD can handle larger EA sizes */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lod-&amp;gt;lod_osd_max_easize &amp;gt; 0) {
                unsigned &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; easize = lod-&amp;gt;lod_osd_max_easize;
                ......
                max_stripes = lov_mds_md_max_stripe_count(easize, LOV_MAGIC_V3);
        }

        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; (stripe_count &amp;lt; max_stripes) ? stripe_count : max_stripes;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In lov_mds_md_max_stripe_count():&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-keyword&quot;&gt;static&lt;/span&gt; inline __u32
lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic)
{
        ......
        &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; LOV_MAGIC_V3: {
                struct lov_mds_md_v3 lmm;

                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (buf_size &amp;lt; sizeof(lmm))
                        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; 0;

                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; (buf_size - sizeof(lmm)) / sizeof(lmm.lmm_objects[0]);
        }
        ......
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And lod-&amp;gt;lod_osd_max_easize is assigned from ddp.ddp_max_ea_size, which is calculated in osd_conf_get() as follows:&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-keyword&quot;&gt;static&lt;/span&gt; void osd_conf_get(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env,
                         &lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct dt_device *dev,
                         struct dt_device_param *param)
{
        struct super_block *sb = osd_sb(osd_dt_dev(dev));
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;                ea_overhead;
        ........
        /* LOD might calculate the max stripe count based on max_ea_size,
         * so we need take account in the overhead as well,
         * xattr_header + magic + xattr_entry_head */
        ea_overhead = sizeof(struct ldiskfs_xattr_header) + sizeof(__u32) +
                      LDISKFS_XATTR_LEN(XATTR_NAME_MAX_LEN);

#&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; defined(LDISKFS_FEATURE_INCOMPAT_EA_INODE)
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (LDISKFS_HAS_INCOMPAT_FEATURE(sb, LDISKFS_FEATURE_INCOMPAT_EA_INODE))
                param-&amp;gt;ddp_max_ea_size = LDISKFS_XATTR_MAX_LARGE_EA_SIZE -
                                                                ea_overhead;
        &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
#endif
                param-&amp;gt;ddp_max_ea_size = sb-&amp;gt;s_blocksize - ea_overhead;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, without enabling the &quot;ea_inode&quot; feature on MDT, the maximum stripe count is calculated as follows:&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;max_stripes = (sb-&amp;gt;s_blocksize - (sizeof(struct ldiskfs_xattr_header) + sizeof(__u32) + LDISKFS_XATTR_LEN(XATTR_NAME_MAX_LEN)) - sizeof(lmm)) / sizeof(lmm.lmm_objects[0])
                    = (4096 - (32 + 4 +48) - 48) / 24
                    = 165
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="200575" author="mhanafi" created="Thu, 29 Jun 2017 13:07:23 +0000"  >&lt;p&gt;We can close this case.&lt;/p&gt;</comment>
                            <comment id="200580" author="pjones" created="Thu, 29 Jun 2017 13:10:18 +0000"  >&lt;p&gt;Thanks Mahmoud&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|hzze1j:</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>