<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:58:53 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-6284] FLD read is not swabbed correctly</title>
                <link>https://jira.whamcloud.com/browse/LU-6284</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt; The &lt;tt&gt;RQF_FLD_READ&lt;/tt&gt; RPC reply format is defined with &quot;generic_data&quot; (&lt;tt&gt;RQF_GENERIC_DATA&lt;/tt&gt;) as the second field, but in fact this is always &lt;tt&gt;struct lu_seq_range_array&lt;/tt&gt; in the two places that I see it used.  Since &lt;tt&gt;RQF_FLD_READ&lt;/tt&gt; does not have any swabber associated with generic data, the client will not swab the FLD reply data.&lt;/p&gt;

&lt;p&gt;That doesn&apos;t cause a problem for current code, because it always assumes MDT0000 for any FID lookup, and we haven&apos;t tested DNE + PPC client systems yet, nor do we have mixed-endian MDS/OSS combinations.  However, this will break for DNE + PPC clients and should be fixed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="28847">LU-6284</key>
            <summary>FLD read is not swabbed correctly</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="yong.fan">nasf</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>llnl</label>
                            <label>ppc</label>
                    </labels>
                <created>Wed, 25 Feb 2015 21:00:23 +0000</created>
                <updated>Tue, 14 Mar 2017 21:18:46 +0000</updated>
                            <resolved>Sat, 10 Sep 2016 04:23:54 +0000</resolved>
                                    <version>Lustre 2.8.0</version>
                                    <fixVersion>Lustre 2.9.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="128987" author="adilger" created="Thu, 1 Oct 2015 10:09:54 +0000"  >&lt;p&gt;This is likely causing problems for ppc_review-dne-part-&lt;span class=&quot;error&quot;&gt;&amp;#91;12&amp;#93;&lt;/span&gt; testing.&lt;/p&gt;</comment>
                            <comment id="161791" author="pjones" created="Fri, 12 Aug 2016 20:51:12 +0000"  >&lt;p&gt;Fan Yong&lt;/p&gt;

&lt;p&gt;Could you please help with this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="161822" author="yong.fan" created="Sat, 13 Aug 2016 15:26:08 +0000"  >&lt;p&gt;I have checked the current master and found that both the FLD-server and FLD-client have handled &quot;lu_seq_range_array&quot; properly as following:&lt;/p&gt;

&lt;p&gt;On the server side:&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;int fld_server_read(const struct lu_env *env, struct lu_server_fld *fld,
                    struct lu_seq_range *range, void *data, int data_len)
{
...
        if (rc &amp;gt; 0)
                rc = 0;
out:
==&amp;gt;        range_array_cpu_to_le(lsra, lsra);
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On the client side:&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;int fld_update_from_controller(const struct lu_env *env,
                               struct lu_server_fld *fld)
{
...
        do {
                rc = fld_client_rpc(fld-&amp;gt;lsf_control_exp, range, FLD_READ,
                                    &amp;amp;req);
                if (rc != 0 &amp;amp;&amp;amp; rc != -EAGAIN)
                        GOTO(out, rc);

                LASSERT(req != NULL);
                lsra = (struct lu_seq_range_array *)req_capsule_server_get(
                                          &amp;amp;req-&amp;gt;rq_pill, &amp;amp;RMF_GENERIC_DATA);
                if (lsra == NULL)
                        GOTO(out, rc = -EPROTO);

==&amp;gt;                range_array_le_to_cpu(lsra, lsra);
...
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That means before the server replying FLD_READ RPC, it will convert the &quot;lu_seq_range_array&quot; as little-endian mode via &quot;range_array_cpu_to_le()&quot;. And when the client receives the FLD_READ reply, it will converts the little-endian mode &quot;lu_seq_range_array&quot; to CPU mode via &quot;range_array_le_to_cpu()&quot;. So there should be no cross-platforms interoperability trouble.&lt;/p&gt;</comment>
                            <comment id="161826" author="adilger" created="Sun, 14 Aug 2016 07:36:45 +0000"  >&lt;p&gt;Is there a reason we don&apos;t just register &lt;tt&gt;range_array_le_to_cpu()&lt;/tt&gt; as the swabber for this buffer so that it is swabbed like normal RPC buffers as part of the RPC handling?&lt;/p&gt;</comment>
                            <comment id="161827" author="yong.fan" created="Sun, 14 Aug 2016 14:45:53 +0000"  >&lt;p&gt;Honestly, I do not know the original reason for why not registered a swabber() as other RPCs do. Do you think it is good time to adjust that now? &lt;/p&gt;</comment>
                            <comment id="161864" author="adilger" created="Mon, 15 Aug 2016 00:24:38 +0000"  >&lt;p&gt;Hmm, it seems that range_array_le_to_cpu() would not be a proper function for swabbing the buffer, since this would convert the array to little endian instead of host endian. If this is registered as the swabbed function it would need to always swab the array if it is called, but it would only be called if swabbing is needed. &lt;/p&gt;</comment>
                            <comment id="161867" author="yong.fan" created="Mon, 15 Aug 2016 04:53:41 +0000"  >&lt;p&gt;Yes, the current implementation will transfer the buffer as little endian on the network, and convert it as host endian in RAM when handle it. Comparing with the registered swabber solution that is only called when necessary, current implementation is NOT efficient, anyway it can work. If we replace it with the registered swabber as other RPCs do, that may cause some interoperability trouble if the peer (different host endian) still uses range_array_{le,cpu}&lt;em&gt;to&lt;/em&gt;{cpu,le}. I think that if there will be some other on-wire protocol changes in the future, then it will be good time-point to adjust it.&lt;/p&gt;</comment>
                            <comment id="161873" author="adilger" created="Mon, 15 Aug 2016 07:41:48 +0000"  >&lt;p&gt;If we have only ever supported little-endian servers, then the only clients that would need to swab would be PPC clients, so I don&apos;t think this should cause any problems...&lt;/p&gt;</comment>
                            <comment id="161875" author="yong.fan" created="Mon, 15 Aug 2016 08:30:45 +0000"  >&lt;p&gt;I may found why we did not registered a swabber() for &apos;FLD_READ&apos; RPC. In theory, we can do that. But from the implementation view, it is not easy to be done within our current &quot;struct req_msg_field&quot; framework. Because the sequence range array is not fixed length, instead, its length depends on the &apos;lu_seq_range&apos; count, that is unknown when prepare the RPC buffer. Generally, for such flexible length RPC usage, there will be a field in the RPC layout to indicate the data length. But for &apos;FLD_READ&apos; RPC, we have no way to indicate the length unless we add new length filed that will broken the on-wire RPC protocol.&lt;/p&gt;</comment>
                            <comment id="164756" author="adilger" created="Fri, 2 Sep 2016 03:30:17 +0000"  >&lt;p&gt;I think the only thing that may be needed here is to add a comment at the swabbed function and at the struct definition that includes the explanation here about what is happening and why. &lt;/p&gt;</comment>
                            <comment id="164892" author="yong.fan" created="Sun, 4 Sep 2016 23:39:07 +0000"  >&lt;p&gt;Here is the patch on master:&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/22309&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/22309&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="165567" author="gerrit" created="Sat, 10 Sep 2016 03:23:58 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/22309/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/22309/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6284&quot; title=&quot;FLD read is not swabbed correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6284&quot;&gt;&lt;del&gt;LU-6284&lt;/del&gt;&lt;/a&gt; ptlrpc: comment for FLD_QUERY RPC reply swab&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 8d8a153e12437900a876293dedc3cc657810ee83&lt;/p&gt;</comment>
                            <comment id="165581" author="pjones" created="Sat, 10 Sep 2016 04:23:54 +0000"  >&lt;p&gt;Landed for 2.9&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="31033">LU-6831</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="25572">LU-5345</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="29170">LU-6387</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|hzx72f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17615</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>