<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:14:09 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-8046] LFSCK does not properly check LOV_MAGIC</title>
                <link>https://jira.whamcloud.com/browse/LU-8046</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In the LFSCK layout checking code, several places check for e.g. &lt;tt&gt;LOV_MAGIC_V1&lt;/tt&gt; and if this isn&apos;t found assume that the layout is &lt;tt&gt;LOV_MAGIC_V3&lt;/tt&gt;.  However, this will break when new layout types are added, like PFL, RAID-1, etc.&lt;/p&gt;

&lt;p&gt;The LFSCK code should explicitly check the lmm_magic is a known value, and if it is not known either skip it (for magics matching &lt;tt&gt;LOV_MAGIC_MAGIC&lt;/tt&gt;) or consider the layout to be corrupt (for magics that don&apos;t match &lt;tt&gt;LOV_MAGIC_MAGIC&lt;/tt&gt;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="36263">LU-8046</key>
            <summary>LFSCK does not properly check LOV_MAGIC</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="6">Not a Bug</resolution>
                                        <assignee username="yong.fan">nasf</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>lfsck</label>
                    </labels>
                <created>Wed, 20 Apr 2016 06:07:15 +0000</created>
                <updated>Thu, 21 Apr 2016 03:21:36 +0000</updated>
                            <resolved>Wed, 20 Apr 2016 13:52:14 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                    <version>Lustre 2.7.0</version>
                    <version>Lustre 2.8.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="149529" author="yong.fan" created="Wed, 20 Apr 2016 13:50:15 +0000"  >&lt;p&gt;In fact, we have already done that. As you can see in the lfsck_layout_verify_header()&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;static int lfsck_layout_verify_header(struct lov_mds_md_v1 *lmm)
{
        __u32 magic;
        __u32 pattern;

        magic = le32_to_cpu(lmm-&amp;gt;lmm_magic);
        /* If magic crashed, keep it there. Sometime later, during OST-object
         * orphan handling, if some OST-object(s) back-point to it, it can be
         * verified and repaired. */
        if (magic != LOV_MAGIC_V1 &amp;amp;&amp;amp; magic != LOV_MAGIC_V3) {
                struct ost_id   oi;
                int             rc;

                lmm_oi_le_to_cpu(&amp;amp;oi, &amp;amp;lmm-&amp;gt;lmm_oi);
                if ((magic &amp;amp; LOV_MAGIC_MASK) == LOV_MAGIC_MAGIC)
                        rc = -EOPNOTSUPP;
                else
                        rc = -EINVAL;

                CDEBUG(D_LFSCK, &quot;%s LOV EA magic %u on &quot;DOSTID&quot;\n&quot;,
                       rc == -EINVAL ? &quot;Unknown&quot; : &quot;Unsupported&quot;,
                       magic, POSTID(&amp;amp;oi));

                return rc;
        }

        pattern = le32_to_cpu(lmm-&amp;gt;lmm_pattern);
        /* XXX: currently, we only support LOV_PATTERN_RAID0. */
        if (lov_pattern(pattern) != LOV_PATTERN_RAID0) {
                struct ost_id oi;

                lmm_oi_le_to_cpu(&amp;amp;oi, &amp;amp;lmm-&amp;gt;lmm_oi);
                CDEBUG(D_LFSCK, &quot;Unsupported LOV EA pattern %u on &quot;DOSTID&quot;\n&quot;,
                       pattern, POSTID(&amp;amp;oi));

                return -EOPNOTSUPP;
        }

        return 0;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Before the caller handling the LOV EA entries, it will call lfsck_layout_verify_header() to check the magic firstly. Currently, only _V1 and _V3 are recognised. If the magic is unknown, and if it matches LOV_MAGIC_MAGIC, then keep it there and skip; otherwise, the LFSCK will regard the LOV EA corrupted and rebuild it from OST-object(s).&lt;/p&gt;</comment>
                            <comment id="149530" author="yong.fan" created="Wed, 20 Apr 2016 13:52:14 +0000"  >&lt;p&gt;The issue has already been resolved.&lt;/p&gt;</comment>
                            <comment id="149542" author="adilger" created="Wed, 20 Apr 2016 15:11:13 +0000"  >&lt;p&gt;If this is the case for older Lustre versions, there is no reason to even have LMAI_PFL set on the file I think?  The client and MDS will not understand the LOV_MAGIC_COMP and ignore the file, but such a file should be allowed to be deleted with an old server, even if it means the OST objects are lost (LFSCK will clean them up).  Having LMAI_PFL set on the file means it cannot even be deleted I think.  &lt;/p&gt;</comment>
                            <comment id="149638" author="yong.fan" created="Thu, 21 Apr 2016 03:18:04 +0000"  >&lt;p&gt;What relationship with the LMAI_PFL flag? As my understand, if the old server does not recognise the new flag LMAI_PFL, it should skip the file directly. So means the old server cannot remove PFL file. But if some reason caused LMAI_PFL not set, the old server still cannot remove the PFL file because it will fail to do that during handling the LOV EA with unknown LOV_MAGIC_COMP magic. So what I can do for this ticket? Sorry, I am some confused.&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|hzy8nz:</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>