<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:03:40 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-91] Impossible to use quotas on RHEL6.0</title>
                <link>https://jira.whamcloud.com/browse/LU-91</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It&apos;s not possible for us to use quotas on our Lustre 2.0 over RHEL6.0.&lt;/p&gt;

&lt;p&gt;When we try to do &quot;lfs quotacheck -ug /fs1/&quot; from a client, and being fs1 a Lustre fs, command hangs without replying (you can see the logs on bugzilla#23707).&lt;/p&gt;

&lt;p&gt;After investigation, we found that Lustre have some conflicts with new code introduced in kernel&apos;s quotas code (fs/quota/). The Lustre stack would be like this:&lt;/p&gt;

&lt;p&gt;ll_quota_on (&lt;del&gt;&amp;gt; return sb&lt;/del&gt;&amp;gt;s_qcop-&amp;gt;quota_on(sb, off, ver, name... (with ver=QFMT_VFS_V0), returning code =-1)&lt;br/&gt;
fsfilt_ext3_quotactl&lt;br/&gt;
quota_onoff&lt;br/&gt;
fsfilt_ext3_quotacheck&lt;/p&gt;


&lt;p&gt;Then, in the ldiskfs (ext4) stack we have the next entries:&lt;/p&gt;

&lt;p&gt;v2_read_file_info (from line &quot;dqopt-&amp;gt;ops&lt;span class=&quot;error&quot;&gt;&amp;#91;type&amp;#93;&lt;/span&gt;-&amp;gt;read_file_info(sb, type) on vfs_load_quota_inode) rc=-1&lt;br/&gt;
vfs_load_quota_inode&lt;br/&gt;
vfs_quota_on_path&lt;br/&gt;
ldiskfs_quota_on&lt;/p&gt;

&lt;p&gt;The -1 value comes from the beginning of v2_read_file_info function:&lt;/p&gt;

&lt;p&gt;static int v2_read_file_info(struct super_block *sb, int type)&lt;br/&gt;
{     &lt;br/&gt;
         struct v2_disk_dqinfo dinfo;&lt;br/&gt;
         struct v2_disk_dqheader dqhead;&lt;br/&gt;
         struct mem_dqinfo *info = sb_dqinfo(sb, type);&lt;br/&gt;
         struct qtree_mem_dqinfo *qinfo;&lt;br/&gt;
         ssize_t size;&lt;br/&gt;
         unsigned int version;&lt;/p&gt;

&lt;p&gt;         if (!v2_read_header(sb, type, &amp;amp;dqhead))&lt;br/&gt;
                 return -1;&lt;br/&gt;
         version = le32_to_cpu(dqhead.dqh_version);&lt;br/&gt;
         if ((info-&amp;gt;dqi_fmt_id == QFMT_VFS_V0 &amp;amp;&amp;amp; version != 0) ||&lt;br/&gt;
             (info-&amp;gt;dqi_fmt_id == QFMT_VFS_V1 &amp;amp;&amp;amp; version != 1))&lt;br/&gt;
               return -1;&lt;/p&gt;

&lt;p&gt;The first condition statement (!v2_read_header(sb, type, &amp;amp;dqhead)) is false, the second is true so v2_read_file_info returns &apos;&lt;del&gt;1&apos;. Values are &quot;info&lt;/del&gt;&amp;gt;dqi_fmt_id = QFMT_VFS_V0&quot; and &quot;version = 1&quot;, so there is a version mismatch between the version in the header of quotas file and the version stored on the ldiskfs super block (info-&amp;gt;dqi_fmt_id).&lt;/p&gt;

&lt;p&gt;This new condition statement was introduced in 2.6.33-rc (commit 869835dfad3eb6f7d90c3255a24b084fea82f30d &quot;quota: Improve checking of quota file header&quot;) and then it was accepted for RHEL6.0 GA so Lustre would hit this problem in any new kernel with this commit on it.&lt;/p&gt;

&lt;p&gt;I was looking where do we initialize the dqhead.dqh_version (this is the &apos;bad&apos; value as we use QFMT_VFS_V0 for quotas on Lustre, isn&apos;t it?) but I didn&apos;t find it. I also looked how ext4 initialize this value but I didn&apos;t find it. This is the first time I&apos;m looking at the quotas code so I ask for help to somebody knowing more than me on quotas:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Do you know where do Lustre or ldiskfs initialize the headers value (&amp;amp;sb-&amp;gt;s_dquot-&amp;gt;files&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;.dqh_version)? Adding traces in Lustre code didn&apos;t help me.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Do you think is possible to have a work-around? Using QFMT_VFS_V1 instead of QFMT_VFS_V0 doesn&apos;t seem a proper WA...&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>RHEL6.0 GA with kernel 2.6.32-71</environment>
        <key id="10388">LU-91</key>
            <summary>Impossible to use quotas on RHEL6.0</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</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="1">Fixed</resolution>
                                        <assignee username="johann">Johann Lombardi</assignee>
                                    <reporter username="dmoreno">Diego Moreno</reporter>
                        <labels>
                    </labels>
                <created>Tue, 22 Feb 2011 07:54:23 +0000</created>
                <updated>Fri, 25 Mar 2011 11:08:11 +0000</updated>
                            <resolved>Thu, 24 Mar 2011 11:22:04 +0000</resolved>
                                    <version>Lustre 2.0.0</version>
                                    <fixVersion>Lustre 2.1.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="10718" author="dmoreno" created="Wed, 23 Feb 2011 06:58:01 +0000"  >&lt;p&gt;I continued analysing the issue and I found where does dqhead version value get initialized. Actually I didn&apos;t find it before because it was obviously initialized the first time we run &quot;lfs quotacheck&quot; on client.&lt;/p&gt;

&lt;p&gt;It&apos;s initialized twice:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The first time it&apos;s initialized in function lustre_init_quota_header, with values from macros LUSTRE_QUOTA_V2(1) and LUSTRE_INITQVERSIONS_V2(
{1,1}).&lt;br/&gt;
&lt;br/&gt;
- The second one it&apos;s initialized in function v3_write_dqheader, with value from V2_INITQVERSIONS_R1 which comes from value in V2_INITQVERSIONS(which is {1,1}
&lt;p&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I changed all initializations to zero and quotas are now working properly. But the problem comes from the last macro, V2_INITQVERSIONS, which is in quotas kernel code (fs/quota/quotaio_v2.h). I don&apos;t know if this is a kernel bug but, do you think it could be a kernel bug?&lt;/p&gt;

&lt;p&gt;Using another macro to initialize dqhead version to &apos;0&apos; can be a WA for new kernels but it doesn&apos;t seem like a proper solution for old 2.6.18, what do you think?&lt;/p&gt;</comment>
                            <comment id="10741" author="johann" created="Thu, 24 Feb 2011 15:19:14 +0000"  >&lt;p&gt;The 32-bit quota format is no longer supported on 2.x, so i think it should be fine to just replace QFMT_VFS_V0 with QFMT_VFS_V1 in lustre/lvfs/fsfilt_ext3.c. Diego, would you mind giving this a try?&lt;/p&gt;</comment>
                            <comment id="10747" author="dmoreno" created="Fri, 25 Feb 2011 02:23:14 +0000"  >&lt;p&gt;That made the trick. Actually when I tried that solution I forgot to update OSS packages...&lt;/p&gt;

&lt;p&gt;Now it works. &lt;/p&gt;

&lt;p&gt;Thanks Johann,&lt;/p&gt;</comment>
                            <comment id="10748" author="dmoreno" created="Fri, 25 Feb 2011 02:26:22 +0000"  >&lt;p&gt;Patch changing QFMT_VFS_V0 to QFMT_VFS_V1 for quotas initialization on recent kernels.&lt;/p&gt;</comment>
                            <comment id="10749" author="johann" created="Fri, 25 Feb 2011 02:58:55 +0000"  >&lt;p&gt;Thanks for the quick feedback. If we don&apos;t want to break older kernels (like RHEL5), we need to add something like:&lt;br/&gt;
#ifdef QFMT_VFS_V1&lt;br/&gt;
... use QFMT_VFS_V1&lt;br/&gt;
#else&lt;br/&gt;
... use QFMT_VFS_V0&lt;br/&gt;
#endif&lt;/p&gt;

&lt;p&gt;Actually, we might just want to use something like QFMT_LUSTRE in the lustre code and define it as appropriate.&lt;br/&gt;
I will push such a patch through gerrit.&lt;/p&gt;</comment>
                            <comment id="10775" author="johann" created="Mon, 28 Feb 2011 07:04:54 +0000"  >&lt;p&gt;Updated patch pushed to gerrit:&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/#change,268&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,268&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="11335" author="hudson" created="Thu, 24 Mar 2011 10:38:34 +0000"  >&lt;p&gt;Integrated in &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://build.whamcloud.com/images/16x16/blue.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; &lt;a href=&quot;http://build.whamcloud.com/job/reviews-centos5/552/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reviews-centos5 #552&lt;/a&gt;&lt;br/&gt;
     &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-91&quot; title=&quot;Impossible to use quotas on RHEL6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-91&quot;&gt;&lt;del&gt;LU-91&lt;/del&gt;&lt;/a&gt; Fix quota format problem with RHEL6 and kernels &amp;gt;= 2.6.33&lt;/p&gt;

&lt;p&gt;Johann Lombardi : &lt;a href=&quot;http://git.whamcloud.com/gitweb/?p=fs/lustre-release.git&amp;amp;a=commit&amp;amp;h=93171cb31cacbd12d976a71ae056775c8e4583b9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;93171cb31cacbd12d976a71ae056775c8e4583b9&lt;/a&gt;&lt;br/&gt;
Files : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;lustre/lvfs/fsfilt_ext3.c&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11336" author="hudson" created="Thu, 24 Mar 2011 11:02:38 +0000"  >&lt;p&gt;Integrated in &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://build.whamcloud.com/images/16x16/red.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; &lt;a href=&quot;http://build.whamcloud.com/job/lustre-master-centos5/162/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;lustre-master-centos5 #162&lt;/a&gt;&lt;br/&gt;
     &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-91&quot; title=&quot;Impossible to use quotas on RHEL6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-91&quot;&gt;&lt;del&gt;LU-91&lt;/del&gt;&lt;/a&gt; Fix quota format problem with RHEL6 and kernels &amp;gt;= 2.6.33&lt;/p&gt;

&lt;p&gt;Oleg Drokin : &lt;a href=&quot;http://git.whamcloud.com/gitweb/?p=fs/lustre-release.git&amp;amp;a=commit&amp;amp;h=b25eb219a157dda49a57e14f7bbc400a52a10a9d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;b25eb219a157dda49a57e14f7bbc400a52a10a9d&lt;/a&gt;&lt;br/&gt;
Files : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;lustre/lvfs/fsfilt_ext3.c&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11337" author="pjones" created="Thu, 24 Mar 2011 11:22:04 +0000"  >&lt;p&gt;Fix is now landed to master&lt;/p&gt;</comment>
                            <comment id="11379" author="hudson" created="Fri, 25 Mar 2011 10:22:02 +0000"  >&lt;p&gt;Integrated in &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://build.whamcloud.com/images/16x16/red.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; &lt;a href=&quot;http://build.whamcloud.com/job/lustre-master/./arch=x86_64,distro=ubuntu/13/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;lustre-master &#187; x86_64,ubuntu #13&lt;/a&gt;&lt;br/&gt;
     &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-91&quot; title=&quot;Impossible to use quotas on RHEL6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-91&quot;&gt;&lt;del&gt;LU-91&lt;/del&gt;&lt;/a&gt; Fix quota format problem with RHEL6 and kernels &amp;gt;= 2.6.33&lt;/p&gt;

&lt;p&gt;Brian J. Murrell : &lt;a href=&quot;http://git.whamcloud.com/gitweb/?p=fs/lustre-dev.git&amp;amp;a=commit&amp;amp;h=cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&lt;/a&gt;&lt;br/&gt;
Files : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;lustre/lvfs/fsfilt_ext3.c&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11383" author="hudson" created="Fri, 25 Mar 2011 10:29:12 +0000"  >&lt;p&gt;Integrated in &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://build.whamcloud.com/images/16x16/blue.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; &lt;a href=&quot;http://build.whamcloud.com/job/reviews-centos5/571/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reviews-centos5 #571&lt;/a&gt;&lt;br/&gt;
     &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-91&quot; title=&quot;Impossible to use quotas on RHEL6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-91&quot;&gt;&lt;del&gt;LU-91&lt;/del&gt;&lt;/a&gt; Fix quota format problem with RHEL6 and kernels &amp;gt;= 2.6.33&lt;/p&gt;

&lt;p&gt;Brian J. Murrell : &lt;a href=&quot;http://git.whamcloud.com/gitweb/?p=fs/lustre-release.git&amp;amp;a=commit&amp;amp;h=cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&lt;/a&gt;&lt;br/&gt;
Files : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;lustre/lvfs/fsfilt_ext3.c&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11385" author="hudson" created="Fri, 25 Mar 2011 10:40:34 +0000"  >&lt;p&gt;Integrated in &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://build.whamcloud.com/images/16x16/red.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; &lt;a href=&quot;http://build.whamcloud.com/job/reviews-rhel6/55/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;reviews-rhel6 #55&lt;/a&gt;&lt;br/&gt;
     &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-91&quot; title=&quot;Impossible to use quotas on RHEL6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-91&quot;&gt;&lt;del&gt;LU-91&lt;/del&gt;&lt;/a&gt; Fix quota format problem with RHEL6 and kernels &amp;gt;= 2.6.33&lt;/p&gt;

&lt;p&gt;Brian J. Murrell : &lt;a href=&quot;http://git.whamcloud.com/gitweb/?p=fs/lustre-dev.git&amp;amp;a=commit&amp;amp;h=cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&lt;/a&gt;&lt;br/&gt;
Files : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;lustre/lvfs/fsfilt_ext3.c&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11391" author="hudson" created="Fri, 25 Mar 2011 11:08:11 +0000"  >&lt;p&gt;Integrated in &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;http://build.whamcloud.com/images/16x16/red.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt; &lt;a href=&quot;http://build.whamcloud.com/job/lustre-master/./arch=x86_64,distro=el6/13/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;lustre-master &#187; x86_64,el6 #13&lt;/a&gt;&lt;br/&gt;
     &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-91&quot; title=&quot;Impossible to use quotas on RHEL6.0&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-91&quot;&gt;&lt;del&gt;LU-91&lt;/del&gt;&lt;/a&gt; Fix quota format problem with RHEL6 and kernels &amp;gt;= 2.6.33&lt;/p&gt;

&lt;p&gt;Brian J. Murrell : &lt;a href=&quot;http://git.whamcloud.com/gitweb/?p=fs/lustre-dev.git&amp;amp;a=commit&amp;amp;h=cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;cc6dc918f19cbabdcb7333d7dccd48fd6e3d72cf&lt;/a&gt;&lt;br/&gt;
Files : &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;lustre/lvfs/fsfilt_ext3.c&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <attachments>
                            <attachment id="10132" name="change_lquota_version_rhel6.patch" size="982" author="dmoreno" created="Fri, 25 Feb 2011 02:26:22 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                    <customfield id="customfield_10020" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Bugzilla ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23707.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10040" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic</customfieldname>
                        <customfieldvalues>
                                        <label>RHEL6</label>
            <label>ext4</label>
            <label>ldiskfs</label>
            <label>quotacheck</label>
            <label>quotas</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzv9lz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5091</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>