<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:12:20 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-14735] out_tx_xattr_set_exec() ENOSPC handling</title>
                <link>https://jira.whamcloud.com/browse/LU-14735</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In &lt;tt&gt;out_tx_xattr_set_exec()&lt;/tt&gt; if &lt;tt&gt;dt_xattr_set()&lt;/tt&gt; returns &lt;tt&gt;-ENOSPC&lt;/tt&gt; then we assume that it was because the xattr was too big to store:&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;again:
                rc = dt_xattr_set(env, dt_obj, ldata.ld_buf,
                                  arg-&amp;gt;u.xattr_set.name, arg-&amp;gt;u.xattr_set.flags,
                                  th);
                if (unlikely(rc == -ENOSPC &amp;amp;&amp;amp; linkea)) {
                        rc = linkea_overflow_shrink(&amp;amp;ldata);
                        if (likely(rc &amp;gt; 0)) {
                                arg-&amp;gt;u.xattr_set.buf.lb_len = rc;
                                goto again;
                        }
                }

unlock:
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But the error may be because we could not create an agent inode in the &lt;tt&gt;REMOTE_PARENT_DIR&lt;/tt&gt;.&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;diff --git a/lustre/osd-ldiskfs/osd_compat.c b/lustre/osd-ldiskfs/osd_compat.c
index 5cbfa75..43e7531 100644
--- a/lustre/osd-ldiskfs/osd_compat.c
+++ b/lustre/osd-ldiskfs/osd_compat.c
@@ -283,8 +283,12 @@ int osd_add_to_remote_parent(const struct lu_env *env, struct osd_device *osd,
        dentry = osd_child_dentry_by_inode(env, parent-&amp;gt;d_inode,
                                           name, strlen(name));
	inode_lock(parent-&amp;gt;d_inode);
-       rc = osd_ldiskfs_add_entry(info, osd, oh-&amp;gt;ot_handle, dentry,
-                                  obj-&amp;gt;oo_inode, NULL);
+
+       if (OBD_FAIL_CHECK(0x8000))
+               rc = -ENOSPC;
+       else
+               rc = osd_ldiskfs_add_entry(info, osd, oh-&amp;gt;ot_handle, dentry,
+                                          obj-&amp;gt;oo_inode, NULL);
        if (!rc &amp;amp;&amp;amp; S_ISDIR(obj-&amp;gt;oo_inode-&amp;gt;i_mode))
		ldiskfs_inc_count(oh-&amp;gt;ot_handle, parent-&amp;gt;d_inode);
	else if (unlikely(rc == -EEXIST))


# lctl set_param fail_loc=0x80008000
fail_loc=0x80008000
# lfs mkdir -i 0 -c -1 /mnt/lustre/d0
# lfs getdirstripe /mnt/lustre/d0
lmv_stripe_count: 4 lmv_stripe_offset: 0 lmv_hash_type: fnv_1a_64
mdtidx           FID[seq:oid:ver]
     0           [0x200000400:0x2:0x0]
     1           [0x240000403:0x2:0x0]
     2           [0x280000403:0x2:0x0]
     3           [0x2c0000403:0x2:0x0]
# sync
# dmesg
[73071.843829] Lustre: *** cfs_fail_loc=8000, val=0***
[73071.844549] LustreError: 6850:0:(osd_handler.c:4647:osd_xattr_handle_linkea()) lustre-MDT0001: failed to create agent entry for [0x240000403:0x2:0x0]: rc = -28

# debugfs -R &apos;ls REMOTE_PARENT_DIR&apos; /dev/mapper/mds1_flakey
 25001  (12) .    2  (4084) ..
# debugfs -R &apos;ls REMOTE_PARENT_DIR&apos; /dev/mapper/mds2_flakey
 25001  (12) .    2  (4084) ..
# debugfs -R &apos;ls REMOTE_PARENT_DIR&apos; /dev/mapper/mds3_flakey
 25001  (12) .    2  (12) ..    25046  (4072) 0x280000403:0x2:0x0
# debugfs -R &apos;ls REMOTE_PARENT_DIR&apos; /dev/mapper/mds4_flakey
 25001  (12) .    2  (12) ..    25046  (4072) 0x2c0000403:0x2:0x0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In this case the error is not propagated.&lt;/p&gt;</description>
                <environment></environment>
        <key id="64543">LU-14735</key>
            <summary>out_tx_xattr_set_exec() ENOSPC handling</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="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Jun 2021 18:26:15 +0000</created>
                <updated>Wed, 16 Jun 2021 22:36:41 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                <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|i01w8v:</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>