<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:20: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-15640] Setting project ID for existing directory fails after update from 2.12 to 2.14</title>
                <link>https://jira.whamcloud.com/browse/LU-15640</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;MDS and OSS are installed with the 2.14 packages from the official repository. Project quotas are enabled following the documentation and they are working as expected for directories created after the upgrade from 2.12 to 2.14.&lt;/p&gt;

&lt;p&gt;Setting a project-ID for an existing directory fails with the following error:&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 project -s -p 1 -r /mnt/directory-created-before-upgrade
lfs: failed to set xattr &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;/mnt/directory-created-before-upgrad&apos;&lt;/span&gt;: No such device or address
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;br/&gt;
Is there any specific procedure required after an upgrade from 2.12 to 2.14 to make project quotas work on old directories?&lt;/p&gt;</description>
                <environment>Kernel: 4.18.0-240.1.1.el8_lustre.x86_64&lt;br/&gt;
Lustre: 2.14.0-1.el8&lt;br/&gt;
ZFS: 2.0.0-1.el8</environment>
        <key id="69076">LU-15640</key>
            <summary>Setting project ID for existing directory fails after update from 2.12 to 2.14</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="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="wc-triage">WC Triage</assignee>
                                    <reporter username="rredl">Robert Redl</reporter>
                        <labels>
                            <label>ZFS</label>
                            <label>quota</label>
                    </labels>
                <created>Fri, 11 Mar 2022 09:48:27 +0000</created>
                <updated>Tue, 28 Jun 2022 01:58:34 +0000</updated>
                                            <version>Lustre 2.14.0</version>
                    <version>Lustre 2.15.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="329586" author="eaujames" created="Fri, 18 Mar 2022 12:08:52 +0000"  >&lt;p&gt;From the Lustre sources:&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-c&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; osd_declare_attr_set(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; lu_env *env,
....
&lt;span class=&quot;code-macro&quot;&gt;#ifdef ZFS_PROJINHERIT
&lt;/span&gt;        if (attr &amp;amp;&amp;amp; attr-&amp;gt;la_valid &amp;amp; LA_PROJID) {
                &lt;span class=&quot;code-comment&quot;&gt;/* quota enforcement &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; project */&lt;/span&gt;
                if (attr-&amp;gt;la_projid != obj-&amp;gt;oo_attr.la_projid) {
                        if (!osd-&amp;gt;od_projectused_dn)
                                GOTO(out, rc = -EOPNOTSUPP);

                        /* Usually, if project quota is upgradable &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the
                         * device, then the upgrade will be done before &lt;span class=&quot;code-keyword&quot;&gt;or&lt;/span&gt; when
                         * mount the device. So when we come here, &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; project
                         * should have project ID attribute already (that is
                         * zero by &lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;).  Otherwise, there was something
                         * wrong during the former upgrade, let&apos;s &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; failure
                         * to report that.
                         *
                         * Please note that, different from other attributes,
                         * you can NOT simply set the project ID attribute under
                         * such &lt;span class=&quot;code-keyword&quot;&gt;case&lt;/span&gt;, because adding (NOT change) project ID
                         * attribute needs to change the object&apos;s attribute
                         * layout to match zfs backend quota accounting
                         * requirement. */
                        if (unlikely(!obj-&amp;gt;oo_with_projid))
                                GOTO(out, rc = -ENXIO);

                        rc = qsd_transfer(env, osd_def_qsd(osd),
                                          &amp;amp;oh-&amp;gt;ot_quota_trans, PRJQUOTA,
                                          obj-&amp;gt;oo_attr.la_projid,
                                          attr-&amp;gt;la_projid, bspace,
                                          &amp;amp;info-&amp;gt;oti_qi, &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;);
                        if (rc)
                                GOTO(out, rc);
                }
        }
&lt;span class=&quot;code-macro&quot;&gt;#endif
&lt;/span&gt;....
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; __osd_object_attr_get(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; lu_env *env, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; osd_device *o,
....
&lt;span class=&quot;code-macro&quot;&gt;#ifdef ZFS_PROJINHERIT
&lt;/span&gt;        if (o-&amp;gt;od_projectused_dn &amp;amp;&amp;amp; osa-&amp;gt;flags &amp;amp; ZFS_PROJID) {
                rc = -sa_lookup(obj-&amp;gt;oo_sa_hdl, SA_ZPL_PROJID(o),
                                &amp;amp;osa-&amp;gt;projid, 8);
                if (rc)
                        GOTO(out_sa, rc);
        
                la-&amp;gt;la_projid = osa-&amp;gt;projid;
                la-&amp;gt;la_valid |= LA_PROJID;
                obj-&amp;gt;oo_with_projid = 1;
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
                la-&amp;gt;la_projid = ZFS_DEFAULT_PROJID;
                la-&amp;gt;la_valid &amp;amp;= ~LA_PROJID;
        }
&lt;span class=&quot;code-macro&quot;&gt;#&lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;           &lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="329590" author="eaujames" created="Fri, 18 Mar 2022 12:49:26 +0000"  >&lt;p&gt;The corresponding commit:&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;commit 291e7196d39365739f9daa02efd25535b5415174
Author: Nathaniel Clark &amp;lt;nclark@whamcloud.com&amp;gt;
Date:   Thu May 16 13:18:04 2019 -0400

    LU-12309 osd-zfs: Support disabled project quotas
    
    Allow project quotas to be compiled in but disabled in the zpool.
    This would be the case for zpools created by pre-0.8.0 ZFS, but then
    used with newer ZFS.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am not sure if this code is involved but it seems likely.&lt;/p&gt;</comment>
                            <comment id="329595" author="rredl" created="Fri, 18 Mar 2022 13:10:25 +0000"  >&lt;p&gt;All pools of MDTs and OSTs have been upgraded and the feature is shown as active:&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;
zpool get feature@project_quota pool
NAME  PROPERTY               VALUE                  SOURCE
pool  feature@project_quota  active                 local
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Project quotas are also working as expected for directories that have been created after the upgrade. The problem is only, that it is not possible to assign a project ID to an old directory. &lt;/p&gt;

&lt;p&gt;Is it possible that a specific upgrade procedure is required? I already tried &lt;tt&gt;lfsck&lt;/tt&gt;, which did not change the situation. What helps is to migrate the directory using &lt;tt&gt;lfs migrate -m 0&lt;/tt&gt;.&lt;/p&gt;</comment>
                            <comment id="336768" author="rredl" created="Sun, 5 Jun 2022 15:20:06 +0000"  >&lt;p&gt;The problem unfortunately persists with Lustre 2.15.0-RC5 and ZFS 2.0.7.&lt;/p&gt;</comment>
                            <comment id="338867" author="rredl" created="Mon, 27 Jun 2022 06:04:28 +0000"  >&lt;p&gt;The patch for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13189&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.whamcloud.com/browse/LU-13189&lt;/a&gt; is solving this issue as well.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="57966">LU-13189</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|i02knr:</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>