<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:14:01 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-1154] CLIO does not send parent FID with OBD_MD_FLFID to OST on setattr</title>
                <link>https://jira.whamcloud.com/browse/LU-1154</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;A filter_fid EA should be added to an OST object whenever the object is being modified - either its data or metadata. However, current 2.x clients send filter_fid/OBD_MD_FLFID information only with OST_WRITE RPCs.  In contrast, 1.x clients pack the OBD_MD_FLFID information into setattr(mtime) and truncate RPCs.  Ideally, the client will pass this information with every object RPC (read or write) so that the OST can verify that the client is accessing the correct OST object for its file IO (most importantly as a sanity check, but also a simple form of capability check).  This will also be important for LFSCK Phase II, when the OST needs to verify that the object parent FID matches the MDT inode FID.&lt;/p&gt;


&lt;p&gt;While there is some code in master client that &lt;em&gt;appears&lt;/em&gt; to be sending this information to the OST, the twisty mess that is CLIO appears to lose this information between where the inode is available in ll_setattr_raw():&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;ll_setattr_raw()
  -&amp;gt;ll_setattr_ost()
    -&amp;gt;cl_setattr_ost()  # attributes are packed into &quot;ost_lvb&quot; here
      -&amp;gt;cl_io_loop()
        -&amp;gt;cl_io_start()
          -&amp;gt;lov_io_start()
            -&amp;gt;osc_io_setattr_start()
              -&amp;gt;cl_object_attr_set()
                -&amp;gt;osc_attr_set()  # attributes unpacked from ost_lvb
              -&amp;gt;osc_setattr_async_base() # RPC is sent here
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;but when the RPC is formed in the parent FID is not in the obdo.  One might mistakenly assume that since ccc_req_attr_set() calls obdo_from_inode() (which always copies the OBD_MD_FLFID information when the inode FID is passed) that this data would make it into the  setattr RPC, but this doesn&apos;t appear in the debug logs, nor is the &quot;fid&quot; xattr set on a file with just &quot;touch&quot;.&lt;/p&gt;

&lt;p&gt;There are many twisty functions, all of them look alike, which makes understanding and debugging this code more difficult than it needs to be:&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;cl_setattr_ost()
cl_object_attr_set()
cl_req_attr_set()
osc_req_attr_set()
osc_attr_set()
ccc_attr_set()
ccc_req_attr_set()
lov_attr_set()
lovsub_req_attr_set()
lovsub_attr_set()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Looking at callchain for ccc_req_attr_set() (starting from the bottom and reverse engineering the callers):&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;  -&amp;gt;osc_enter_cache()
    -&amp;gt;osc_check_rpcs()
      -&amp;gt;osc_check_rpcs0()
        -&amp;gt;osc_send_oap_rpc()
          -&amp;gt;osc_build_req()
            -&amp;gt;cl_req_attr_set()
              -&amp;gt;ccc_req_attr_set()
                -&amp;gt;obdo_from_inode()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;it appears that this function is only used by write and not setattr.  It may be possible to use something like the 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;        obdo_from_inode(oa, NULL, &amp;amp;cl_i2info(ccc_object_inode(obj))-&amp;gt;lli_fid, 0);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It would be nice to remove the duplication of &quot;cl_attr_set&quot; and &quot;cl_req_attr_set&quot;, but I&apos;m not well enough versed in this code to understand the consequences yet.&lt;/p&gt;

&lt;p&gt;I think the following functions are no longer used by the master client, but I&apos;m not really sure.  It may be that even the MDS does not use them anymore on the orion branch, so they might be removed to reduce confusion and obsolete code.&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;lov_setattr()
lov_setattr_async()
lov_prep_setattr_set()
lov_update_setattr_set()
lov_fini_setattr_set()
cb_setattr_set()
osc_setattr()
osc_setattr_async()
osc_setattr_interpret()
osc_setattr_async_base()
osc_io_setattr_start()
osc_io_setattr_end()
osc_setattr_upcall()
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="13379">LU-1154</key>
            <summary>CLIO does not send parent FID with OBD_MD_FLFID to OST on setattr</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="bobijam">Zhenyu Xu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>HB</label>
                    </labels>
                <created>Wed, 29 Feb 2012 18:02:45 +0000</created>
                <updated>Thu, 22 Jan 2015 20:06:29 +0000</updated>
                            <resolved>Thu, 22 Jan 2015 20:06:29 +0000</resolved>
                                    <version>Lustre 2.1.0</version>
                    <version>Lustre 2.2.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="30072" author="jay" created="Thu, 1 Mar 2012 01:22:34 +0000"  >&lt;p&gt;If you want to send more attribute info to OST in setattr request, we can pass that info into u.ci_setattr so that osc can use it to pack RPCs. For callbacks of cl_req, sometimes we need to fetch some information from upper layers when we clean up cache(BRW) on the osc layer. Other similar callbacks are osc_&lt;/p&gt;
{refresh_count|make_ready|completion}
&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;I agree it&apos;s very bad to have obsoleted code in clio stack. I&apos;ll remove them soon.&lt;/p&gt;</comment>
                            <comment id="62063" author="adilger" created="Wed, 10 Jul 2013 22:42:19 +0000"  >&lt;p&gt;Assign this to Bobijam so it can be part of the CLIO cleanup work being done.  Sending the MDS FID along with every OST RPC (both read and write, getattr and setattr, punch, destroy, etc) is the most desirable outcome.  Not only does this allow the MDS FID to be stored on the OST object (for any modifying RPC), but it also allows the OST to verify that the client is accessing the correct object during normal operation.&lt;/p&gt;</comment>
                            <comment id="79585" author="jlevi" created="Tue, 18 Mar 2014 17:48:35 +0000"  >&lt;p&gt;Jinshan,&lt;br/&gt;
Has this already been fixed?&lt;/p&gt;</comment>
                            <comment id="79586" author="adilger" created="Tue, 18 Mar 2014 17:49:04 +0000"  >&lt;p&gt;Jinshan, Bobijam, has this problem been fixed on master, or does work still need to be done for this?  I think that this is important for correct LFSCK operation.&lt;/p&gt;</comment>
                            <comment id="79638" author="jay" created="Wed, 19 Mar 2014 00:18:24 +0000"  >&lt;p&gt;We don&apos;t do this work yet. Right now CLIO only packs OST FID in both WRITE and SETATTR RPC, but never pack parent FID in the RPC.&lt;/p&gt;</comment>
                            <comment id="100237" author="adilger" created="Fri, 28 Nov 2014 18:29:24 +0000"  >&lt;p&gt;Is this part of the CLIO cleanup?  This should definitely be fixed, since the lack of parent FID prevents LFSCK from working correctly in some cases, and in the future the OSTs will refuse RPCs that are not correctly identified with the parent MDS FID. &lt;/p&gt;</comment>
                            <comment id="100288" author="gerrit" created="Mon, 1 Dec 2014 09:25:13 +0000"  >&lt;p&gt;Bobi Jam (bobijam@gmail.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/12888&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12888&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1154&quot; title=&quot;CLIO does not send parent FID with OBD_MD_FLFID to OST on setattr&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1154&quot;&gt;&lt;del&gt;LU-1154&lt;/del&gt;&lt;/a&gt; clio: rename coo_attr_set to coo_upd_attr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: be3411b78d306c3a1ed8314c2166bb491461a044&lt;/p&gt;</comment>
                            <comment id="100393" author="gerrit" created="Tue, 2 Dec 2014 09:29:16 +0000"  >&lt;p&gt;Bobi Jam (bobijam@gmail.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/12902&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12902&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1154&quot; title=&quot;CLIO does not send parent FID with OBD_MD_FLFID to OST on setattr&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1154&quot;&gt;&lt;del&gt;LU-1154&lt;/del&gt;&lt;/a&gt; clio: pass fid for OST setattr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fbb4cae4e110de5a767c9ddd1e032e3e11416ffe&lt;/p&gt;</comment>
                            <comment id="103891" author="jay" created="Mon, 19 Jan 2015 18:48:59 +0000"  >&lt;p&gt;the patches are ready to land.&lt;/p&gt;</comment>
                            <comment id="104372" author="gerrit" created="Thu, 22 Jan 2015 20:03:26 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/12888/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12888/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1154&quot; title=&quot;CLIO does not send parent FID with OBD_MD_FLFID to OST on setattr&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1154&quot;&gt;&lt;del&gt;LU-1154&lt;/del&gt;&lt;/a&gt; clio: rename coo_attr_set to coo_attr_update&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 65e067d5d90270d4237a7271008561a4b432b94d&lt;/p&gt;</comment>
                            <comment id="104373" author="gerrit" created="Thu, 22 Jan 2015 20:03:34 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/12902/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/12902/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1154&quot; title=&quot;CLIO does not send parent FID with OBD_MD_FLFID to OST on setattr&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1154&quot;&gt;&lt;del&gt;LU-1154&lt;/del&gt;&lt;/a&gt; clio: pass fid for OST setattr&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3f09c2b10e0aef9b20df18ca3cf2e4638159d3db&lt;/p&gt;</comment>
                            <comment id="104377" author="pjones" created="Thu, 22 Jan 2015 20:06:29 +0000"  >&lt;p&gt;Landed for 2.7&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|hzvv0f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9027</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>
                                                                                                                                                    <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>