<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:31:11 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-3125] Oops in mdd_swap_layouts()</title>
                <link>https://jira.whamcloud.com/browse/LU-3125</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Layout swap on stripeless files may oops in mdd_swap_layouts().&lt;/p&gt;

&lt;p&gt;To reproduce:&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;fd[0] = open(&quot;f0&quot;, O_CREAT|O_WRONLY, 0666);
fd[1] = open(&quot;f1&quot;, O_CREAT|O_WRONLY|O_LOV_DELAY_CREAT, 0666);

struct lustre_swap_layouts sl = {
        .sl_fd = fd[1],
        .sl_flags = 0,
        .sl_gid = 0,
};

ioctl(fd[0], LL_IOC_LOV_SWAP_LAYOUTS, &amp;amp;sl)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;crash&amp;gt; bt -l
...
    [exception RIP: mdd_swap_layouts+918]
    RIP: ffffffffa051d2b6  RSP: ffff88014a29bc20  RFLAGS: 00010246
    RAX: 0000000000000000  RBX: ffff8801529d16c0  RCX: ffff88015159aa00
    RDX: 0000000000000002  RSI: 0000000000000000  RDI: ffff880154757fc0
    RBP: ffff88014a29bce0   R8: 0000000000000246   R9: 00000000fffffffc
    R10: ffff880161679c60  R11: 0000000000000000  R12: ffff880161679cc0
    R13: ffff88013f458940  R14: ffff88015eac9670  R15: 0000000000000000
    ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
 #9 [ffff88014a29bce8] mdt_swap_layouts at ffffffffa0a4b834 [mdt]
    /root/lustre-release/lustre/include/md_object.h: 620
#10 [ffff88014a29bd48] mdt_handle_common at ffffffffa0a460f8 [mdt]
    /root/lustre-release/lustre/mdt/mdt_handler.c: 2984
#11 [ffff88014a29bd98] mds_regular_handle at ffffffffa0a823f5 [mdt]
    /root/lustre-release/lustre/mdt/mdt_mds.c: 354
#12 [ffff88014a29bda8] ptlrpc_server_handle_request at ffffffffa06293cc [ptlrpc]
    /root/lustre-release/lustre/include/lustre_net.h: 2944
#13 [ffff88014a29bea8] ptlrpc_main at ffffffffa062a8c5 [ptlrpc]
    /root/lustre-release/lustre/ptlrpc/service.c: 2482
#14 [ffff88014a29bf48] kernel_thread at ffffffff8100c0ca
    /usr/src/debug///////kernel-2.6.32-279.19.1.el6/linux-2.6.32-279.19.1.el6_lustre_gcov.x86_64/arch/x86/kernel/entry_64.S: 1213
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;static int mdd_swap_layouts(const struct lu_env *env, struct md_object *obj1,&lt;br/&gt;
                            struct md_object *obj2, __u64 flags)&lt;br/&gt;
{&lt;br/&gt;
        ...&lt;/p&gt;

&lt;p&gt;        /* lmm and generation layout initialization */&lt;br/&gt;
        if (fst_buf) &lt;/p&gt;
{
                fst_lmm = fst_buf-&amp;gt;lb_buf;
                fst_gen = le16_to_cpu(fst_lmm-&amp;gt;lmm_layout_gen);
	}
&lt;p&gt; else &lt;/p&gt;
{
                fst_lmm = NULL;
                fst_gen = 0;
        }

&lt;p&gt;        ...&lt;/p&gt;

&lt;p&gt;        /* save the orignal lmm common header of first file                               &lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;to be able to roll back */&lt;br/&gt;
        OBD_ALLOC_PTR(old_fst_lmm);&lt;br/&gt;
        if (old_fst_lmm == NULL)&lt;br/&gt;
                GOTO(unlock, rc = -ENOMEM);&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;        /* XXX fst_lmm may be NULL here. */&lt;br/&gt;
        memcpy(old_fst_lmm, fst_lmm, sizeof(*old_fst_lmm));&lt;/p&gt;

&lt;p&gt;        ...&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment></environment>
        <key id="18284">LU-3125</key>
            <summary>Oops in mdd_swap_layouts()</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="laisiyao">Lai Siyao</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>MB</label>
                            <label>mdd</label>
                    </labels>
                <created>Mon, 8 Apr 2013 17:10:33 +0000</created>
                <updated>Tue, 23 Apr 2013 16:17:40 +0000</updated>
                            <resolved>Tue, 23 Apr 2013 16:17:40 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.4.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="55802" author="adilger" created="Mon, 8 Apr 2013 20:25:31 +0000"  >&lt;p&gt;The patch for fixing this problem should include a test case which triggers the above problem.&lt;/p&gt;</comment>
                            <comment id="55924" author="laisiyao" created="Tue, 9 Apr 2013 19:23:32 +0000"  >&lt;p&gt;patch is on &lt;a href=&quot;http://review.whamcloud.com/#change,5998&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,5998&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="56039" author="jlevi" created="Wed, 10 Apr 2013 18:21:33 +0000"  >&lt;p&gt;Did this patch include the feedback from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3145&quot; title=&quot;layout swap on stripeless file will interact badly with MOF_LOV_CREATED&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3145&quot;&gt;&lt;del&gt;LU-3145&lt;/del&gt;&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="56041" author="jhammond" created="Wed, 10 Apr 2013 18:30:04 +0000"  >&lt;p&gt;No.  It&apos;s really two issues.  The later issue is already present but masked by this one.  That said, we can merge the issues or not.&lt;/p&gt;</comment>
                            <comment id="56824" author="pjones" created="Tue, 23 Apr 2013 16:17:40 +0000"  >&lt;p&gt;Landed for 2.4&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="18317">LU-3145</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="18317">LU-3145</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|hzvnd3:</customfieldvalue>

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