<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:19:25 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-8653] broken inheritance of default striping</title>
                <link>https://jira.whamcloud.com/browse/LU-8653</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I think we have a problem with inheritance in the following patch&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/#/c/19041/23/lustre/lod/lod_object.c,unified&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#/c/19041/23/lustre/lod/lod_object.c,unified&lt;/a&gt;&lt;br/&gt;
from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7660&quot; title=&quot;FS default striping settings only honored on MDT 0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7660&quot;&gt;&lt;del&gt;LU-7660&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem code is below:&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;3117	+&#187;       &lt;span class=&quot;code-comment&quot;&gt;/* &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; parent doesn&apos;t provide all defaults, striping from fs &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; */&lt;/span&gt;
3118	+&#187;       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (d-&amp;gt;lod_md_root != NULL &amp;amp;&amp;amp;
3119	+&#187;           (lc-&amp;gt;ldo_stripenr == 0 ||
3120	+&#187;            lc-&amp;gt;ldo_stripe_size == 0 ||
3121	+&#187;            lc-&amp;gt;ldo_stripe_offset == LOV_OFFSET_DEFAULT ||
3122	+&#187;            lc-&amp;gt;ldo_pool == NULL)) {
3123	+&#187;       &#187;       memset(lds, 0, sizeof(*lds));
3124	+&#187;       &#187;       lod_get_default_lov_striping(env, d-&amp;gt;lod_md_root, lds);
3125	+&#187;       &#187;       lod_striping_from_default(lc, lds, child_mode);
3126	+&#187;       }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;while it is correct about stripe number, count and offset checks, it is not correct about pool check. Since pool is optional value, it is not right to ignore parent layout just because it has no pool.&lt;/p&gt;

&lt;p&gt;For example, I set some striping on the directory and expect all files/subdirs inside to have the same striping, but in fact that will not work, striping will be taken from fs root. Moreover, default fs striping may have no pool as well but still be used prior the parent striping.&lt;/p&gt;

&lt;p&gt;I&apos;ve encountered such problem while porting DoM patches, because it is quite visible when DOM layout is used or not as expected&lt;/p&gt;</description>
                <environment></environment>
        <key id="40200">LU-8653</key>
            <summary>broken inheritance of default striping</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.whamcloud.com/images/icons/priorities/trivial.svg">Trivial</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="wc-triage">WC Triage</assignee>
                                    <reporter username="tappro">Mikhail Pershin</reporter>
                        <labels>
                    </labels>
                <created>Fri, 30 Sep 2016 09:25:31 +0000</created>
                <updated>Fri, 2 Feb 2018 18:26:36 +0000</updated>
                            <resolved>Sat, 1 Oct 2016 17:40:58 +0000</resolved>
                                    <version>Lustre 2.10.0</version>
                                    <fixVersion>Lustre 2.11.0</fixVersion>
                    <fixVersion>Lustre 2.10.4</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="167885" author="adilger" created="Fri, 30 Sep 2016 16:22:43 +0000"  >&lt;p&gt;The layout should only be inherited from the root if there is no layout explicitly supplied for the file AND no layout on the parent.  If the parent layout has, for example, stripe_count = 4 and stripe_size=0, then the file should use stripe_count = 4, and inherit the stripe_size from the filesystem default.  Similarly, if the parent has no pool, but the root specifies a pool, then it should inherit the pool from the root layout.&lt;/p&gt;

&lt;p&gt;What it shouldn&apos;t do is inherit the whole layout from the root if some part of the parent is specified.&lt;/p&gt;

&lt;p&gt;Looking at &lt;tt&gt;lod_ah_init()&lt;/tt&gt; it appears that it will inherit all of the layout from the parent layout if possible (i.e. &lt;tt&gt;if (likely(parent))&lt;/tt&gt; block), and if there are still any unset values it will try to inherit them from the root layout, which seems correct to me.  Since the default filesystem layout does not specify a pool, if a filesystem default pool is specified by the admin then I think it makes sense to use it if no pool is otherwise specified.  For example, if a filesystem has a mix of HDD and SSD OSTs, and the admin specifies the filesystem default pool to be the HDD OSTs to avoid the SSD OSTs filling up with files that shouldn&apos;t be there, I don&apos;t think it makes sense to allow a user to specify a directory-level layout without a pool and suddenly all files in that directory are striped across all OSTs in the filesystem.&lt;/p&gt;

&lt;p&gt;Mike, could you please provide some specific examples of what problem you are having, so I can better understand it.&lt;/p&gt;</comment>
                            <comment id="167903" author="tappro" created="Fri, 30 Sep 2016 17:36:10 +0000"  >&lt;p&gt;I see, lod_striping_from_default() sets only missed values, so it will never overwrite already set values. With pool I also agree. So this ticket is not valid I think, sorry for this noise. &lt;/p&gt;

&lt;p&gt;Meanwhile, my problem appeared because of pattern inheritance. For example, DOM is set on parent, but in it file is created with setstripe -c 1.&lt;br/&gt;
In that case stripe count is set and remains at 1, but pattern is inherited as DOM and I got assertion that DOM layout has 1 stripe count. I think that pattern shouldn&apos;t be inherited but set to RAID0 explicitly if created with lfs setstripe without &apos;-P mdt&apos;.&lt;/p&gt;</comment>
                            <comment id="167905" author="tappro" created="Fri, 30 Sep 2016 17:39:22 +0000"  >&lt;p&gt;Also it is not clear about how to inherit pool for DOM files since they are not placed on OSTs, so it can be skipped and kept as NULL or maybe it is OK to inherit the default one from FS? just in case this file will grow and got stripes on OSTs.&lt;/p&gt;</comment>
                            <comment id="167936" author="adilger" created="Fri, 30 Sep 2016 19:13:10 +0000"  >&lt;p&gt;At some point I&apos;d also like to have MDT pools, for example to restrict DOM files to a specific group of MDTs.&lt;/p&gt;

&lt;p&gt;I think that inheriting the OST pool would be useful if the file grows beyond the DOM limit.&lt;/p&gt;

&lt;p&gt;As for pattern inheritance, that is tricky, since having a special case to treat DOM inheritance differently may also be confusing to users.  I guess if the stripe count is &amp;gt; 1 it makes sense to not use DOM since it can&apos;t be striped across multiple MDTs.  Having stripe &amp;gt; 0 should be the same, but that depends on how filesystems store the default file layout - do they use stripe_count = 0 by default, and that is replaced with stripe_count = 1 when the layout is being instantiated, or is the default file layout stored with stripe_count = 1?&lt;/p&gt;</comment>
                            <comment id="167984" author="adilger" created="Sat, 1 Oct 2016 01:05:54 +0000"  >&lt;p&gt;Hmm, looking at &lt;tt&gt;mkfs_lustre.c&lt;/tt&gt; I see that &lt;tt&gt;set_defaults()&lt;/tt&gt; is setting &lt;tt&gt;mo_stripe_count=1&lt;/tt&gt; explicitly, rather than setting it to 0 and letting the MDS decide what the default stripe count should be, which means that the stripe count can&apos;t be inherited (or should be ignored?) if the layout pattern &lt;tt&gt;LOV_PATTERN_MDT&lt;/tt&gt; is specified, and conversely &lt;tt&gt;LOV_PATTERN_MDT&lt;/tt&gt; shouldn&apos;t be inherited if the stripe count is explicitly specified...&lt;/p&gt;</comment>
                            <comment id="167998" author="tappro" created="Sat, 1 Oct 2016 07:08:42 +0000"  >&lt;p&gt;default values have stripe count &amp;gt; 0 if not specified otherwise. I got the idea, thanks., and I am going to close this bug.&lt;/p&gt;

&lt;p&gt;Just noticed your last comment, yes, that is what I saw too, and I am doing the same now - if striping is set with &lt;tt&gt;LFS&lt;/tt&gt; it always get layout &lt;tt&gt;RAID0&lt;/tt&gt; if other is not specified with &lt;tt&gt;-P ...&lt;/tt&gt;, pattern is inherited only if unset. &lt;br/&gt;
DOM pattern is always used with &lt;tt&gt;stripenr 0&lt;/tt&gt;, so &lt;tt&gt;stripenr&lt;/tt&gt; is number of stripes over OSTs only, pattern itself indicates that there is stripe on MDT and it can be only one, so this is OK. Alos this make things easier in many cases in LOV/LOD code, where we have cycles over stripenr with calls to osc/osp, they are just skipped naturally with DOM.&lt;/p&gt;</comment>
                            <comment id="170914" author="gerrit" created="Tue, 25 Oct 2016 05:24:38 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/23353&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/23353&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8653&quot; title=&quot;broken inheritance of default striping&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8653&quot;&gt;&lt;del&gt;LU-8653&lt;/del&gt;&lt;/a&gt; lod: use stripe_count instead of stripe_nr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d578a7916c10cb5353280a77bb2b9e10eb5638e9&lt;/p&gt;</comment>
                            <comment id="192367" author="gerrit" created="Mon, 17 Apr 2017 21:51:57 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/26681&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/26681&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8653&quot; title=&quot;broken inheritance of default striping&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8653&quot;&gt;&lt;del&gt;LU-8653&lt;/del&gt;&lt;/a&gt; lod: use stripe_count instead of stripe_nr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fbcda1afa6bd2faedbfedcc844a6358d8a7ece01&lt;/p&gt;</comment>
                            <comment id="207123" author="gerrit" created="Thu, 31 Aug 2017 19:17:28 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/26681/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/26681/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8653&quot; title=&quot;broken inheritance of default striping&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8653&quot;&gt;&lt;del&gt;LU-8653&lt;/del&gt;&lt;/a&gt; lod: use stripe_count instead of stripe_nr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 53d3890f16e4c6e5717c4d020ef213897a36c2b7&lt;/p&gt;</comment>
                            <comment id="209095" author="gerrit" created="Thu, 21 Sep 2017 17:08:38 +0000"  >&lt;p&gt;Minh Diep (minh.diep@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/29142&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29142&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8653&quot; title=&quot;broken inheritance of default striping&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8653&quot;&gt;&lt;del&gt;LU-8653&lt;/del&gt;&lt;/a&gt; lod: use stripe_count instead of stripe_nr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8fcde8f199bd380d14608189bfe199bef61db461&lt;/p&gt;</comment>
                            <comment id="219863" author="gerrit" created="Fri, 2 Feb 2018 17:17:31 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/29142/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/29142/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8653&quot; title=&quot;broken inheritance of default striping&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8653&quot;&gt;&lt;del&gt;LU-8653&lt;/del&gt;&lt;/a&gt; lod: use stripe_count instead of stripe_nr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0e3d4c768892b308c9682c00772045900a5566d0&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="34094">LU-7660</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|hzyq1b:</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>