<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:02: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-6732] Cannot pick up EDQUOT from ll_write_begin and ll_write_end</title>
                <link>https://jira.whamcloud.com/browse/LU-6732</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When -EDQUOT happens in ll_write_begin or ll_write_end, write(2) may return 0 with no errno. This is because of the implementation of generic_perform_write(). &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 ssize_t generic_perform_write( ... )
{
        ...
        do {
                ...
                status = a_ops-&amp;gt;write_begin( ... );
                if (unlikely(status))
                        break;
                ...
                status = a_ops-&amp;gt;write_end( ... );
                if (unlikely(status))
                        break;
                copied = status;
                ...
                written += copied;
                ...
        } while (iov_iter_count(i));
        return written ? written : status;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;when &quot;written&quot; already isn&apos;t zero and EDQUOT happened in ll_write_begin() or ll_write_end(), generic_perform_write() returns &quot;written&quot; bytes and ignores &quot;status&quot;. So vvp_io_write_start() has no way to know the error.&lt;/p&gt;

&lt;p&gt;We can confirm the issue using quota function like following&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;bash-4.1$ id
uid=60000(quota_usr) gid=60000(quota_usr) groups=60000(quota_usr)
bash-4.1$ lfs quota /mnt/lustre
Disk quotas for user quota_usr (uid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre 1048580*  58617   59617       -      10       0       0       -
Disk quotas for group quota_usr (gid 60000):
     Filesystem  kbytes   quota   limit   grace   files   quota   limit   grace
    /mnt/lustre 1048580       0       0       -      10       0       0       -
bash-4.1$ dd if=/dev/zero of=/mnt/lustre/quota bs=4M count=1 (&amp;lt;--- PTLRPC_MAX_BRW_PAGES)
dd: writing `/mnt/lustre/quota&apos;: No space left on device
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.028993 s, 0.0 kB/s
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And the following is a strace log.&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;strace dd if=/dev/zero of=/mnt/lustre/quota bs=4M count=1
...
read(0, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&quot;..., 4194304) = 4194304
write(1, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&quot;..., 4194304) = 0
...
write(2, &quot;: No space left on device&quot;, 25: No space left on device) = 25
write(2, &quot;\n&quot;, 1
)                       = 1
close(0)                                = 0
close(1)                                = 0
write(2, &quot;1+0 records in\n0+0 records out\n&quot;, 311+0 records in
0+0 records out
) = 31
write(2, &quot;0 bytes (0 B) copied&quot;, 200 bytes (0 B) copied)    = 20
write(2, &quot;, 0.0365546 s, 0.0 kB/s\n&quot;, 24, 0.0365546 s, 0.0 kB/s
) = 24
close(2)                                = 0
exit_group(1)                           = ?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;write(2) should&apos;ve return -1 with EDQUOT but, as you can see, it actually returned 0 with no errno.&lt;br/&gt;
(ENOSPC was set in dd. check the source)&lt;/p&gt;</description>
                <environment></environment>
        <key id="30688">LU-6732</key>
            <summary>Cannot pick up EDQUOT from ll_write_begin and ll_write_end</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="1">Fixed</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="nozaki">Hiroya Nozaki</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Tue, 16 Jun 2015 05:34:21 +0000</created>
                <updated>Thu, 10 Dec 2015 18:10:06 +0000</updated>
                            <resolved>Thu, 10 Dec 2015 18:10:06 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="118642" author="gerrit" created="Tue, 16 Jun 2015 05:49:24 +0000"  >&lt;p&gt;Hiroya Nozaki (nozaki.hiroya@jp.fujitsu.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/15302&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15302&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6732&quot; title=&quot;Cannot pick up EDQUOT from ll_write_begin and ll_write_end&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6732&quot;&gt;&lt;del&gt;LU-6732&lt;/del&gt;&lt;/a&gt; llite: Cannot pick up EDQUOT from ll_write_begin/end&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: cde0eff7657bab72cde858be2e4d18d93e645ff4&lt;/p&gt;</comment>
                            <comment id="124254" author="nozaki" created="Mon, 17 Aug 2015 00:29:14 +0000"  >&lt;p&gt;needs one more +1 review.&lt;br/&gt;
Could someone review this patch, please ?&lt;/p&gt;</comment>
                            <comment id="135877" author="gerrit" created="Thu, 10 Dec 2015 17:45:44 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/15302/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/15302/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6732&quot; title=&quot;Cannot pick up EDQUOT from ll_write_begin and ll_write_end&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6732&quot;&gt;&lt;del&gt;LU-6732&lt;/del&gt;&lt;/a&gt; llite: ll_write_begin/end not passing on errors&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 05300cbf466d97368b00b49d57839186e5662687&lt;/p&gt;</comment>
                            <comment id="135891" author="jgmitter" created="Thu, 10 Dec 2015 18:10:06 +0000"  >&lt;p&gt;Landed for 2.8&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|hzxfvb:</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>