<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:23:48 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-16077] Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead</title>
                <link>https://jira.whamcloud.com/browse/LU-16077</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Recently, we had to limit a user on an OST of products (lot of libs in it). But we were not able to do that with TBF. After some tries, we were able to set a limit, but with the GID&apos;s owner.&lt;br/&gt;
Setting this limit, globally decrease the bandwidth for everybody (all files in the products have the same uid/gid).&lt;/p&gt;

&lt;p&gt;The TBF rules on an OST get the uid/gid values from: &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-c&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; ost_tbf_id_cli_set(&lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; ptlrpc_request *req,
                              &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; tbf_id *id)         
        &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; ost_body *body; 
...
                 id-&amp;gt;ti_uid = body-&amp;gt;oa.o_uid;
                 id-&amp;gt;ti_gid = body-&amp;gt;oa.o_gid;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;These values are filled by the osc here:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-c&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; osc_build_rpc(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; lu_env *env, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; client_obd *cli,
                  &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; list_head *ext_list, &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; cmd)             
....
         crattr-&amp;gt;cra_oa = oa;                      
         cl_req_attr_set(env, osc2cl(obj), crattr);


&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt;                                                            
osc_brw_prep_request(&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; cmd, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; client_obd *cli, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; obdo *oa,
                     u32 page_count, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; brw_page **pga,           
                     &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; ptlrpc_request **reqp, &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; resend)        
.....
        lustre_set_wire_obdo(&amp;amp;req-&amp;gt;rq_import-&amp;gt;imp_connect_data, &amp;amp;body-&amp;gt;oa, oa); 
                                                                                
        /* For READ &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; WRITE, we can&apos;t fill o_uid &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; o_gid &lt;span class=&quot;code-keyword&quot;&gt;using&lt;/span&gt; from_kuid()  
         * &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; from_kgid(), because they are asynchronous. Fortunately, variable
         * oa contains valid o_uid &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; o_gid in these two operations.           
         * Besides, filling o_uid &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; o_gid is enough &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; nrs-tbf, see LU-9658. 
         * OBD_MD_FLUID &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; OBD_MD_FLUID is &lt;span class=&quot;code-keyword&quot;&gt;not&lt;/span&gt; set in order to avoid breaking  
         * other process logic */                                               
        body-&amp;gt;oa.o_uid = oa-&amp;gt;o_uid;                                             
        body-&amp;gt;oa.o_gid = oa-&amp;gt;o_gid;                                             
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So the uid/gid use to filter the request came directly from the inode attr.&lt;/p&gt;</description>
                <environment></environment>
        <key id="71649">LU-16077</key>
            <summary>Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="eaujames">Etienne Aujames</assignee>
                                    <reporter username="eaujames">Etienne Aujames</reporter>
                        <labels>
                    </labels>
                <created>Fri, 5 Aug 2022 08:52:17 +0000</created>
                <updated>Wed, 27 Sep 2023 11:18:32 +0000</updated>
                            <resolved>Thu, 31 Aug 2023 14:49:36 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>8</watches>
                                                                            <comments>
                            <comment id="342679" author="eaujames" created="Fri, 5 Aug 2022 10:47:31 +0000"  >&lt;p&gt;I think this issue can be fixed the same way that for jobid:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-c&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; vvp_io_init(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; lu_env *env, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; cl_object *obj,
                &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; cl_io *io)                               
....
        if (io-&amp;gt;ci_type == CIT_READ || io-&amp;gt;ci_type == CIT_WRITE) {       
                size_t count;                                            
                &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; ll_inode_info *lli = ll_i2info(inode);            
                                                                         
                count = io-&amp;gt;u.ci_rw.crw_count;                           
                /* &quot;If nbyte is 0, read() will &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; 0 &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt; have no other
                 *  results.&quot;  -- Single Unix Spec */                    
                if (count == 0)                                          
                        result = 1;                                      
                &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;                                                     
                        vio-&amp;gt;vui_tot_count = count;                      
                                                                         
                /* &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; read/write, we store the jobid in the inode, &lt;span class=&quot;code-keyword&quot;&gt;and&lt;/span&gt;  
                 * it&apos;ll be fetched by osc when building RPC.            
                 *                                                       
                 * it&apos;s &lt;span class=&quot;code-keyword&quot;&gt;not&lt;/span&gt; accurate&lt;span class=&quot;code-keyword&quot;&gt; if&lt;/span&gt; the file is shared by different  
                 * jobs.                                                 
                 */                                                      
                lustre_get_jobid(lli-&amp;gt;lli_jobid, &lt;span class=&quot;code-keyword&quot;&gt;sizeof&lt;/span&gt;(lli-&amp;gt;lli_jobid));

&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;void&lt;/span&gt;&lt;/span&gt; vvp_req_attr_set(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; lu_env *env, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; cl_object *obj,
                             &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; cl_req_attr *attr)                       
....
         memcpy(attr-&amp;gt;cra_jobid, ll_i2info(inode)-&amp;gt;lli_jobid,
                &lt;span class=&quot;code-keyword&quot;&gt;sizeof&lt;/span&gt;(attr-&amp;gt;cra_jobid));                    

&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; osc_build_rpc(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; lu_env *env, &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; client_obd *cli,
                  &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; list_head *ext_list, &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; cmd)             
....
        lustre_msg_set_jobid(req-&amp;gt;rq_reqmsg, crattr-&amp;gt;cra_jobid);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="343524" author="gerrit" created="Fri, 12 Aug 2022 20:19:44 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/48213&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/48213&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; osc: restore uid/gid from inode info for brw request&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 790029bed88b1acb0624333df7b75ccb7d945698&lt;/p&gt;</comment>
                            <comment id="343766" author="gerrit" created="Tue, 16 Aug 2022 20:44:20 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/48235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/48235&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; tbf: pb_uid/pb_gid ptlrpc_body fields for tbf rules&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: a53baca225a9b7640d022b3ae28b6bbe478e03c0&lt;/p&gt;</comment>
                            <comment id="369708" author="gerrit" created="Tue, 18 Apr 2023 03:21:59 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/48235/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/48235/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; tbf: pb_uid/pb_gid ptlrpc_body fields for TBF rules&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0544c108c12c87a43562b4ef31120448bf0018c8&lt;/p&gt;</comment>
                            <comment id="369749" author="pjones" created="Tue, 18 Apr 2023 12:11:48 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                            <comment id="370371" author="adilger" created="Mon, 24 Apr 2023 18:13:31 +0000"  >&lt;p&gt;I noticed a couple of issues with the patch after it landed that need to be fixed before 2.16 is released. Comments on the patch. &lt;/p&gt;</comment>
                            <comment id="373313" author="gerrit" created="Wed, 24 May 2023 13:46:37 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51122&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51122&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; ptlrpc: Fix ptlrpc_body_v2 with pb_uid/pb_gid&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d45e48db07c8820e86ad60faae153ed0f6affcb6&lt;/p&gt;</comment>
                            <comment id="377250" author="gerrit" created="Mon, 3 Jul 2023 12:54:09 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51536&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51536&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; tbf: pb_uid/pb_gid ptlrpc_body fields for TBF rules&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 160408f1e5947c3fe2748e4eeff2340e18b293ca&lt;/p&gt;</comment>
                            <comment id="377252" author="gerrit" created="Mon, 3 Jul 2023 13:10:10 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51537&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51537&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; ptlrpc: Fix ptlrpc_body_v2 with pb_uid/pb_gid&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f2ea4a0f9d29f463b53e92bdb6bd07d886bb5387&lt;/p&gt;</comment>
                            <comment id="384307" author="gerrit" created="Thu, 31 Aug 2023 06:17:36 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51122/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51122/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16077&quot; title=&quot;Cannot use tbf to filter brw request per effective uid/gid, inode attr ids is used instead&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16077&quot;&gt;&lt;del&gt;LU-16077&lt;/del&gt;&lt;/a&gt; ptlrpc: Fix ptlrpc_body_v2 with pb_uid/pb_gid&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: afe5813a482478642acc0aacfe195d465e0f1e2c&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="78143">LU-17149</issuekey>
        </issuelink>
                            </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_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>OSC</label>
            <label>QoS-TBF</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i02wd3:</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>