<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:52:33 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-12434] use filesystem default dir layout for new directories</title>
                <link>https://jira.whamcloud.com/browse/LU-12434</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Filesystem default dir layout stored in ROOT is not used in new directory creation, this is a technical debt of DNE code. It should follow the same semantic as filesystem default file layout:&lt;br/&gt;
1. if user specified layout, use the input to create new directories.&lt;br/&gt;
2. else if parent directory has default dir layout, check whether this default dir layout is sufficient (stripe_count is not 0 and hash_type is not &apos;none&apos;), if so, use it to create.&lt;br/&gt;
3. else if filesystem has default dir layout, and fill missing fields with it, then check whether it&apos;s sufficient, if so, use it to create.&lt;br/&gt;
4. else fill missing fields with default values (stripe_count is &quot;1&quot;, hash_type is &quot;fnv16&quot;), and create.&lt;/p&gt;</description>
                <environment></environment>
        <key id="55944">LU-12434</key>
            <summary>use filesystem default dir layout for new directories</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="3">Duplicate</resolution>
                                        <assignee username="laisiyao">Lai Siyao</assignee>
                                    <reporter username="laisiyao">Lai Siyao</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Jun 2019 03:43:11 +0000</created>
                <updated>Fri, 26 Nov 2021 21:49:21 +0000</updated>
                            <resolved>Fri, 26 Nov 2021 21:48:59 +0000</resolved>
                                    <version>Upstream</version>
                    <version>Lustre 2.12.0</version>
                    <version>Lustre 2.10.8</version>
                                                        <due>Tue, 13 Aug 2019 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="249188" author="adilger" created="Thu, 13 Jun 2019 07:10:00 +0000"  >&lt;p&gt;A tricky problem here is that the new &quot;&lt;tt&gt;hash=space&lt;/tt&gt;&quot; code is implemented using the default directory layout.&#160; If this is set on the root directory, then suddenly every directory in the filesystem will use space-balanced &lt;tt&gt;mkdir()&lt;/tt&gt; without any way to turn it off.&lt;/p&gt;

&lt;p&gt;If we want this to work, either the &lt;tt&gt;hash=space&lt;/tt&gt; code needs to be implemented as a regular LMV layout (maybe just a flag in the layout type), or some other rule needs to be implemented for inheritance.&lt;/p&gt;</comment>
                            <comment id="249189" author="laisiyao" created="Thu, 13 Jun 2019 07:38:09 +0000"  >&lt;p&gt;This is not an issue for ROOT because its default layout is not inherited. And if its hash type is set to &apos;space&apos;, this value will only be used in its subdir creation (checked in LMV), and for other directories, the default value &apos;fnv16&apos; will be used if a proper value is not provided.&lt;/p&gt;

&lt;p&gt;But it may become an issue for normal plain directories, we may add a inheritance count like you suggested before. Or we can leave it like this, and suggest user not to set this on normal plain directories, and let dir restripe (TDB) to balance MDT usage.&lt;/p&gt;</comment>
                            <comment id="249191" author="laisiyao" created="Thu, 13 Jun 2019 08:13:16 +0000"  >&lt;p&gt;There is a major difference between default dir layout and default file layout: ROOT default layout doesn&apos;t affect master MDT choosing for directories not under it, because it&apos;s chosen by lmv_locate_tgt() on client, and it&apos;s decided by its parent layout and default layout. This is why &apos;space&apos; hash is not an issue for ROOT.&lt;/p&gt;</comment>
                            <comment id="249265" author="adilger" created="Fri, 14 Jun 2019 07:54:24 +0000"  >&lt;p&gt;I don&apos;t think it makes sense to wait for dir restripe, since that will be at least one release away, and will only balance large directories.  Being able to balance small directories on a regular basis is more important for regular usage.  I don&apos;t think it makes sense to limit space-hashed directories to only be used on ROOT, since they can be very useful for e.g. top-level user directories (to distribute their files across MDTs).&lt;/p&gt;

&lt;p&gt;I think the main issue is if new subdirectories below a space-hash directory are always created as striped:&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-quote&quot;&gt;&quot;space&quot;&lt;/span&gt; hash type can only be set in &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; LMV, child use
                 * FNV_1A_64 in &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; it&apos;s striped.
                 */
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lo-&amp;gt;ldo_dir_hash_type == LMV_HASH_TYPE_SPACE)
                        lo-&amp;gt;ldo_dir_hash_type = LMV_HASH_TYPE_FNV_1A_64;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think it makes sense to move the &lt;tt&gt;lum_stripe_count&lt;/tt&gt; check into &lt;tt&gt;lod_striping_from_default()&lt;/tt&gt; so &lt;tt&gt;lum_stripe_count=0&lt;/tt&gt; or &lt;tt&gt;lum_stripe_count=1&lt;/tt&gt; would create a plain subdirectory, otherwise, the directory would be created with the specified parameters in &lt;tt&gt;lmv_user_md_v1&lt;/tt&gt;., which makes the code more clear:&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;else&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lds-&amp;gt;lds_dir_def_striping_set &amp;amp;&amp;amp; S_ISDIR(mode)) {
                :
                :
                &lt;span class=&quot;code-comment&quot;&gt;/* &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; stripe count is 1 or 0,  create normal directory */&lt;/span&gt;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lo-&amp;gt;ldo_dir_stripe_count &amp;lt;= 1) {
                        lo-&amp;gt;ldo_dir_hash_type = LMV_HASH_TYPE_NONE;
                        lo-&amp;gt;ldo_dir_stripe_count = 0;
                }

                /*
                 * &lt;span class=&quot;code-quote&quot;&gt;&quot;space&quot;&lt;/span&gt; hash type can only be set in &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt; LMV, child use
                 * FNV_1A_64 in &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt; it&apos;s striped.
                 */
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (lo-&amp;gt;ldo_dir_hash_type == LMV_HASH_TYPE_SPACE)
                        lo-&amp;gt;ldo_dir_hash_type = LMV_HASH_TYPE_FNV_1A_64;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;However, this only allows setting the hash type to &lt;tt&gt;FNV_1A_64&lt;/tt&gt;, which may be limiting in the future.&lt;/p&gt;

&lt;p&gt;One option would be to change &lt;tt&gt;lum_hash_type&lt;/tt&gt; to be like &lt;tt&gt;LOV_PATTERN_&amp;#42;&lt;/tt&gt; and have a 16-bit mask in the high bits and a 16-bit type, and put &lt;tt&gt;LMV_HASH_FLAG_SPACE&lt;/tt&gt; in the mask part, and let the low bits store &lt;tt&gt;LMV_HASH_TYPE_FNV_1A_64&lt;/tt&gt; or &lt;tt&gt;LMV_HASH_TYPE_ALL_CHARS&lt;/tt&gt; or &lt;tt&gt;LMV_HASH_TYPE_UNKNOWN&lt;/tt&gt; (which should be renamed to &lt;tt&gt;LMV_HASH_TYPE_NONE&lt;/tt&gt;) to indicate what type of subdirectory should be created.&lt;/p&gt;

&lt;p&gt;For the inherited layout, the &lt;tt&gt;lum_hash_type&lt;/tt&gt; would be inherited if &lt;tt&gt;lum_inherit_count &amp;gt; 0&lt;/tt&gt; and cleared once &lt;tt&gt;lum_inherit_count == 0&lt;/tt&gt; to only create plain directories below that. &lt;/p&gt;</comment>
                            <comment id="249371" author="laisiyao" created="Mon, 17 Jun 2019 04:12:58 +0000"  >&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;                /*
                 * &quot;space&quot; hash type can only be set in default LMV, child use
                 * FNV_1A_64 in case it&apos;s striped.
                 */
                if (lo-&amp;gt;ldo_dir_hash_type == LMV_HASH_TYPE_SPACE)
                        lo-&amp;gt;ldo_dir_hash_type = LMV_HASH_TYPE_FNV_1A_64;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This code only changes hash type to default hash type, it doesn&apos;t mean subdirectories will be created as striped. This is just in case user set directory default layout hash to &apos;space&apos; and stripe count &amp;gt; 1.&lt;/p&gt;

&lt;p&gt;I&apos;ll add a patch to implement inherit count first. &lt;/p&gt;</comment>
                            <comment id="249373" author="adilger" created="Mon, 17 Jun 2019 04:40:33 +0000"  >&lt;p&gt;OK, good.  I was a bit concerned about that, but it seems OK if it falls back to plain directory type for &lt;tt&gt;lum_stripe_count &amp;lt;= 1&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;PS: it is confusing to me that the &lt;tt&gt;struct lmv_user_md&lt;/tt&gt; fields are named &quot;&lt;tt&gt;lum_&amp;#42;&lt;/tt&gt;&quot; the same as &lt;tt&gt;struct lov_user_md&lt;/tt&gt;.  It would maybe be better to name them &quot;&lt;tt&gt;luv_&amp;#42;&lt;/tt&gt;&quot; or something to make them different, though I understand that would also be a lot of lines changed...&lt;/p&gt;</comment>
                            <comment id="249593" author="adilger" created="Thu, 20 Jun 2019 15:17:31 +0000"  >&lt;p&gt;It looks like there is already a mask &lt;tt&gt;LMV_HASH_TYPE_MASK&lt;/tt&gt; declared in &lt;tt&gt;lustre_idl.h&lt;/tt&gt; along with several &lt;tt&gt;LMV_HASH_FLAG_&amp;#42;&lt;/tt&gt; values, while the actual &lt;tt&gt;LMV_HASH_TYPE_&amp;#42;&lt;/tt&gt; values are declared in &lt;tt&gt;lustre_user.h&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;To allow us to potentially allow inheriting different hash types from &quot;space&quot; hashed directories, we should consider moving &lt;tt&gt;LMV_HASH_TYPE_SPACE&lt;/tt&gt; to be &lt;tt&gt;LMV_HASH_FLAG_SPACE&lt;/tt&gt; and change the value to be in the high bits.  This could easily be done now, but will be much more difficult after 2.13 is released.  The &lt;tt&gt;LMV_HASH_FLAG_&amp;#42;&lt;/tt&gt; values should also be moved into &lt;tt&gt;lustre_user.h&lt;/tt&gt; so that they are together into &lt;tt&gt;enum lmv_hash_type&lt;/tt&gt; , so we don&apos;t accidentally declare conflicting values.&lt;/p&gt;</comment>
                            <comment id="319259" author="adilger" created="Fri, 26 Nov 2021 21:48:37 +0000"  >&lt;p&gt;This was largely implemented in patch &lt;a href=&quot;https://review.whamcloud.com/44090&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/44090&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14792&quot; title=&quot;DNE3: enable filesystem-wide default LMV&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14792&quot;&gt;&lt;del&gt;LU-14792&lt;/del&gt;&lt;/a&gt; llite: enable filesystem-wide default LMV&lt;/tt&gt;&quot; using &quot;&lt;tt&gt;lum_stripe_offset = -1&lt;/tt&gt;&quot; and remote 1-stripe directories to do space balancing.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;LMV_HASH_TYPE_SPACE&lt;/tt&gt; was renamed to &lt;tt&gt;LMV_HASH_FLAG_SPACE&lt;/tt&gt; in patch &lt;a href=&quot;https://review.whamcloud.com/35318&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35318&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-11213&quot; title=&quot;DNE3: remote mkdir() in ROOT/ by default&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-11213&quot;&gt;&lt;del&gt;LU-11213&lt;/del&gt;&lt;/a&gt; uapi: change &apos;space&apos; hash type to hash flag&lt;/tt&gt;&quot; and removed entirely in patch &lt;a href=&quot;https://review.whamcloud.com/35825&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/35825&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12624&quot; title=&quot;DNE3: striped directory allocate stripes by QoS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12624&quot;&gt;&lt;del&gt;LU-12624&lt;/del&gt;&lt;/a&gt; lod: alloc dir stripes by QoS&lt;/tt&gt;&quot;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="56556">LU-12624</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="64857">LU-14792</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="52903">LU-11213</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|i00i67:</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>