<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:22:07 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-8969] sanity test_56x: read failed: Invalid argument</title>
                <link>https://jira.whamcloud.com/browse/LU-8969</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This issue was created by maloo for Bob Glossman &amp;lt;bob.glossman@intel.com&amp;gt;&lt;/p&gt;

&lt;p&gt;This issue relates to the following test suite run: &lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/3f9ace90-c8ca-11e6-8911-5254006e85c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/3f9ace90-c8ca-11e6-8911-5254006e85c2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The sub-test test_56x failed with the following error:&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;migrate failed rc = 22
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;fails in the same test as previous bug &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8559&quot; title=&quot;sanity test_56xa: cannot swap layouts: Operation not permitted&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8559&quot;&gt;&lt;del&gt;LU-8559&lt;/del&gt;&lt;/a&gt;, but different errors.&lt;/p&gt;

&lt;p&gt;Info required for matching: sanity 56x&lt;/p&gt;</description>
                <environment></environment>
        <key id="42644">LU-8969</key>
            <summary>sanity test_56x: read failed: Invalid argument</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</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="ys">Yang Sheng</assignee>
                                    <reporter username="maloo">Maloo</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Dec 2016 15:21:33 +0000</created>
                <updated>Tue, 28 Mar 2017 18:46:23 +0000</updated>
                            <resolved>Mon, 9 Jan 2017 13:07:51 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="179068" author="bogl" created="Tue, 27 Dec 2016 15:00:26 +0000"  >&lt;p&gt;another on master, sles12sp2:&lt;br/&gt;
&lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/ef072448-cbed-11e6-8580-5254006e85c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/ef072448-cbed-11e6-8580-5254006e85c2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="179103" author="bogl" created="Wed, 28 Dec 2016 17:51:19 +0000"  >&lt;p&gt;have discovered by trial and error that eliminating the use of O_DIRECT in lfs.c makes this problem go away.  not entirely sure why.&lt;/p&gt;</comment>
                            <comment id="179237" author="bogl" created="Fri, 30 Dec 2016 16:22:19 +0000"  >&lt;p&gt;This appears to be due to a difference in arg checking in linux 4.4 vs. earlier linux versions.  I constructed a simple test program that just opens an existing file with O_DIRECT and reads through it 1MB at a time.  This is similar to migrate_copy_data().&lt;/p&gt;

&lt;p&gt;On earlier versions of linux the read returns 0 on the read at EOF as expected regardless of the length of the file.&lt;/p&gt;

&lt;p&gt;On linux 4.4, the sles12sp2 kernel version, it returns 0 on the read at EOF only if the file length is a multiple of page_size. If it isn&apos;t then the read fails, returning -1 with an errno of EINVAL.  This is true of all fs types, not just lustre.&lt;/p&gt;

&lt;p&gt;I strongly suspect that in linux 4.4 the kernel does more careful and complete checking of the read args for O_DIRECT reads and returns EINVAL on an EOF read when EOF isn&apos;t a page_size boundary.  This makes sense since such a read violates the requirements of O_DIRECT I/O that enforces restrictions on the file offsets of I/O.  I speculate that in earlier linux&apos;es the checking for EOF on reads was done before the checking of args, and in linux 4.4 the checking on args is done first.  Again, I emphasize this difference in behavior is seen on all fs types, not just lustre.  This is strong evidence that it isn&apos;t primarily a lustre bug but due to the I/O logic in the underlying kernel.&lt;/p&gt;

&lt;p&gt;This being the case it makes sense that turning off O_DIRECT makes the problem go away.  The only question is if that solution is permissible in the lfs_migrate() code.&lt;/p&gt;</comment>
                            <comment id="179243" author="simmonsja" created="Fri, 30 Dec 2016 17:21:44 +0000"  >&lt;p&gt;I have seen this failure for some time in my upstream client testing. I always assumed it was some faulty port. Thanks for tracking this down.&lt;/p&gt;</comment>
                            <comment id="179249" author="bogl" created="Fri, 30 Dec 2016 18:06:53 +0000"  >&lt;p&gt;will push a patch turning off O_DIRECT.  I expect reviewers will tell me if that&apos;s not allowed.&lt;/p&gt;</comment>
                            <comment id="179250" author="gerrit" created="Fri, 30 Dec 2016 18:08:42 +0000"  >&lt;p&gt;Bob Glossman (bob.glossman@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/24549&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/24549&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8969&quot; title=&quot;sanity test_56x: read failed: Invalid argument&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8969&quot;&gt;&lt;del&gt;LU-8969&lt;/del&gt;&lt;/a&gt; utils: avoid use of O_DIRECT in lfs_migrate&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 95843e1f6d8f46a2e305cbfdcb19dc0bfb3d5ca6&lt;/p&gt;</comment>
                            <comment id="179260" author="gerrit" created="Fri, 30 Dec 2016 21:17:47 +0000"  >&lt;p&gt;Yang Sheng (yang.sheng@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/24552&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/24552&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8969&quot; title=&quot;sanity test_56x: read failed: Invalid argument&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8969&quot;&gt;&lt;del&gt;LU-8969&lt;/del&gt;&lt;/a&gt; llite: sanity test_56x read failed: Invalid argument&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 23c9778cc006ea75cd2f01d7baa4561c4d5219a7&lt;/p&gt;</comment>
                            <comment id="179597" author="simmonsja" created="Wed, 4 Jan 2017 18:57:35 +0000"  >&lt;p&gt;Are both patches needed?&lt;/p&gt;</comment>
                            <comment id="179602" author="bogl" created="Wed, 4 Jan 2017 19:28:35 +0000"  >&lt;p&gt;No.  My patch is Abandoned.  Only &lt;a href=&quot;https://review.whamcloud.com/24552&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/24552&lt;/a&gt; is needed.&lt;/p&gt;</comment>
                            <comment id="180016" author="gerrit" created="Mon, 9 Jan 2017 05:56:00 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/24552/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/24552/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-8969&quot; title=&quot;sanity test_56x: read failed: Invalid argument&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-8969&quot;&gt;&lt;del&gt;LU-8969&lt;/del&gt;&lt;/a&gt; llite: sanity test_56x read failed: Invalid argument&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 2730656aa4d4326e67615e9652c576545403ed15&lt;/p&gt;</comment>
                            <comment id="180035" author="ys" created="Mon, 9 Jan 2017 13:07:51 +0000"  >&lt;p&gt;Patch landed. Close this ticket.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </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|hzyz7r:</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>