<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:32:46 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-17116] losetup --direct-io=on trigger LASSERT(ll_dio_aio) in ll_file_io_generic</title>
                <link>https://jira.whamcloud.com/browse/LU-17116</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When trying to use direct I/O on loop devices to format and mount an XFS filesystem backed on a Lustre file, we ran into the following crash:&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;
PID: 51772 &#160;TASK: ffff950e22f117c0 &#160;CPU: 1 &#160; COMMAND: &lt;span class=&quot;code-quote&quot;&gt;&quot;loop4&quot;&lt;/span&gt;
&#160;#0 [ffffafe700c8b8a0] machine_kexec at ffffffffb9659a5e
&#160;#1 [ffffafe700c8b8f8] __crash_kexec at ffffffffb975928d
&#160;#2 [ffffafe700c8b9c0] panic at ffffffffb96b1498
&#160;#3 [ffffafe700c8ba48] ll_direct_IO_impl at ffffffffc1755194 [lustre]
&#160;#4 [ffffafe700c8bb08] generic_file_read_iter at ffffffffb981cd1f
&#160;#5 [ffffafe700c8bb50] vvp_io_read_start at ffffffffc17673be [lustre]
&#160;#6 [ffffafe700c8bbe8] cl_io_start at ffffffffc09e673d [obdclass]
&#160;#7 [ffffafe700c8bc10] cl_io_loop at ffffffffc09e9d1a [obdclass]
&#160;#8 [ffffafe700c8bc48] ll_file_io_generic at ffffffffc170e510 [lustre]
&#160;#9 [ffffafe700c8bd40] ll_file_read_iter at ffffffffc170f9a6 [lustre]
#10 [ffffafe700c8bdb0] lo_rw_aio at ffffffffc08037a9 [loop]
#11 [ffffafe700c8be28] loop_queue_work at ffffffffc0804bc7 [loop]
#12 [ffffafe700c8bee0] kthread_worker_fn at ffffffffb96d5224
#13 [ffffafe700c8bf10] kthread at ffffffffb96d4802
#14 [ffffafe700c8bf50] ret_from_fork at ffffffffba000242 &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This crash is triggered by `LASSERT(ll_dio_aio)` in `ll_file_io_generic`. The issue is that the loop block device uses `kiocb::ki_flags = IOCB_DIRECT` to trigger a direct I/O but Lustre only looks at `&lt;a href=&quot;file::f_flags&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;file::f_flags&lt;/a&gt; &amp;amp; O_DIRECT` to assess whether we are in DIO or not. This leads to inconsistencies in the expected variables that should be available in the read/write code paths.&lt;/p&gt;

&lt;p&gt;This crash was produced with:&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;
truncate -s 100M /mnt/lustre/disk
losetup -f b 4096 -direct-io=on /mnt/lustre/disk &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="77896">LU-17116</key>
            <summary>losetup --direct-io=on trigger LASSERT(ll_dio_aio) in ll_file_io_generic</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="courrier">Guillaume Courrier</assignee>
                                    <reporter username="courrier">Guillaume Courrier</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Sep 2023 12:58:03 +0000</created>
                <updated>Thu, 14 Sep 2023 15:40:01 +0000</updated>
                            <resolved>Thu, 14 Sep 2023 15:40:01 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="385981" author="courrier" created="Thu, 14 Sep 2023 12:59:42 +0000"  >&lt;p&gt;I have a patch ready to fix this issue. I will after I create a test for it.&lt;/p&gt;</comment>
                            <comment id="386019" author="paf0186" created="Thu, 14 Sep 2023 15:39:31 +0000"  >&lt;p&gt;This isn&apos;t exactly a duplicate of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16695&quot; title=&quot;switch Lustre to use IOCB_APPEND and IOCB_DIRECT instead of file flags&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16695&quot;&gt;&lt;del&gt;LU-16695&lt;/del&gt;&lt;/a&gt;, but as Guillaume noted, it is fixed by &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16695&quot; title=&quot;switch Lustre to use IOCB_APPEND and IOCB_DIRECT instead of file flags&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16695&quot;&gt;&lt;del&gt;LU-16695&lt;/del&gt;&lt;/a&gt;.&#160; I&apos;m noting the relationship and will close as a dupe now that we&apos;ve got them linked.&lt;/p&gt;</comment>
                            <comment id="386020" author="paf0186" created="Thu, 14 Sep 2023 15:40:01 +0000"  >&lt;p&gt;This is fixed by the patch in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16695&quot; title=&quot;switch Lustre to use IOCB_APPEND and IOCB_DIRECT instead of file flags&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16695&quot;&gt;&lt;del&gt;LU-16695&lt;/del&gt;&lt;/a&gt;, so mark this a duplicate.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="75380">LU-16695</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|i03vk7:</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>