<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:55:57 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-5954] IOC_MDC_GETFILEINFO returns the wrong ino</title>
                <link>https://jira.whamcloud.com/browse/LU-5954</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;If the command is IOC_MDC_GETFILEINFO then ll_dir_ioctl() should be returning the ino derived from the body but is instead returning the ino of the parent.&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-java&quot;&gt;        skip_lmm:
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) {
                        struct lov_user_mds_data __user *lmdp;
                        lstat_t st = { 0 };

                        st.st_dev       = inode-&amp;gt;i_sb-&amp;gt;s_dev;
			st.st_mode      = body-&amp;gt;mbo_mode;
                        st.st_nlink     = body-&amp;gt;mbo_nlink;
                        st.st_uid       = body-&amp;gt;mbo_uid;
                        st.st_gid       = body-&amp;gt;mbo_gid;
                        st.st_rdev      = body-&amp;gt;mbo_rdev;
                        st.st_size      = body-&amp;gt;mbo_size;
                        st.st_blksize   = PAGE_CACHE_SIZE;
                        st.st_blocks    = body-&amp;gt;mbo_blocks;
                        st.st_atime     = body-&amp;gt;mbo_atime;
                        st.st_mtime     = body-&amp;gt;mbo_mtime;
			st.st_ctime     = body-&amp;gt;mbo_ctime;
                        st.st_ino       = inode-&amp;gt;i_ino;

                        lmdp = (struct lov_user_mds_data __user *)arg;
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (copy_to_user(&amp;amp;lmdp-&amp;gt;lmd_st, &amp;amp;st, sizeof(st)))
                                GOTO(out_req, rc = -EFAULT);
                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We should always return the ino derived from the body.&lt;/p&gt;</description>
                <environment></environment>
        <key id="27718">LU-5954</key>
            <summary>IOC_MDC_GETFILEINFO returns the wrong ino</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="wc-triage">WC Triage</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>llapi</label>
                            <label>patch</label>
                    </labels>
                <created>Tue, 25 Nov 2014 17:28:31 +0000</created>
                <updated>Wed, 15 Jun 2016 13:02:31 +0000</updated>
                            <resolved>Wed, 15 Jun 2016 13:02:31 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                    <fixVersion>Lustre 2.9.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="136112" author="akam.k" created="Fri, 11 Dec 2015 22:04:09 +0000"  >&lt;p&gt;John,&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;struct inode *inode = file-&amp;gt;f_path.dentry-&amp;gt;d_inode;
.
.
...
st.st_ino&amp;gt;      = inode-&amp;gt;i_ino;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;gt; If the command is IOC_MDC_GETFILEINFO then ll_dir_ioctl() should be returning the ino derived from the body but is instead returning the ino of the parent.&lt;br/&gt;
where is the reference for parent coming from here ? Am i missing anything.&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;struct mdt_body *body;
...
 1398                 if (request) {
   1399                         body = req_capsule_server_get(&amp;amp;request-&amp;gt;rq_pill,
   1400                                                       &amp;amp;RMF_MDT_BODY);

2199 struct mdt_body {
   2200 &amp;gt;       struct lu_fid mbo_fid1;
   2201 &amp;gt;       struct lu_fid mbo_fid2;
   2202 &amp;gt;       struct lustre_handle mbo_handle;
...
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;gt; We should always return the ino derived from the body.&lt;br/&gt;
I dont see any inode member in mdt_body. Is there any other way to extract it from body ?  Please correct me if I am wrong.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="136343" author="jhammond" created="Tue, 15 Dec 2015 16:09:05 +0000"  >&lt;p&gt;This inode number is derived from the fid. See for example &lt;tt&gt;ll_update_inode()&lt;/tt&gt;:&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-java&quot;&gt;        inode-&amp;gt;i_ino = cl_fid_build_ino(&amp;amp;body-&amp;gt;mbo_fid1,
                                        sbi-&amp;gt;ll_flags &amp;amp; LL_SBI_32BIT_API);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="136389" author="gerrit" created="Tue, 15 Dec 2015 18:27:55 +0000"  >&lt;p&gt;akam kumar bharathi (azurelustre@gmail.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/17618&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17618&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5954&quot; title=&quot;IOC_MDC_GETFILEINFO returns the wrong ino&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5954&quot;&gt;&lt;del&gt;LU-5954&lt;/del&gt;&lt;/a&gt; IOC_MDC_GETFILEINFO returns the wrong ino&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2197464707dfe6347ce2efd8947a18fde6f5fe9e&lt;/p&gt;</comment>
                            <comment id="155602" author="gerrit" created="Tue, 14 Jun 2016 03:50:26 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/17618/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17618/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5954&quot; title=&quot;IOC_MDC_GETFILEINFO returns the wrong ino&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5954&quot;&gt;&lt;del&gt;LU-5954&lt;/del&gt;&lt;/a&gt; IOC_MDC_GETFILEINFO returns the wrong ino&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 86158ae647b25338489bcb3181f29081f1d0368f&lt;/p&gt;</comment>
                            <comment id="155766" author="jgmitter" created="Wed, 15 Jun 2016 13:02:31 +0000"  >&lt;p&gt;patch has landed to master for 2.9.0&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|hzx1jb:</customfieldvalue>

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