<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:10: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-838] &quot;lfs path2fid /mnt/lustre&quot; (ROOT) returns inode number</title>
                <link>https://jira.whamcloud.com/browse/LU-838</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Running &quot;lfs path2fid&quot; on the Lustre mountpoint (e.g. /mnt/lustre) will return the underlying &quot;ROOT/&quot; directory inode number.  This is bad for a number of reasons:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;it exposes the on-disk inode number to userspace as an IGIF value&lt;/li&gt;
	&lt;li&gt;this will be broken after a backup/restore cycle&lt;/li&gt;
	&lt;li&gt;this value is stored in the &quot;link&quot; xattr of all files in the ROOT/ directory&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;$ lfs path2fid /mnt/lustre&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0x61ab:0x6cad245e:0x0&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;$ getfattr -d -m trusted.link -e hex /mnt/lustre/etc&lt;br/&gt;
getfattr: Removing leading &apos;/&apos; from absolute path names&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;file: mnt/lustre/etc&lt;br/&gt;
trusted.link=0xdff1ea11010000002d000000000000000000000000000000001500000000000061ab6cad245e00000000657463&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;This should probably be fixed by moving MDD_ROOT_INDEX_OID to be 1UL or 2UL, and then returning FID_SEQ_START:MDD_ROOT_INDEX_OID to the client, like:&lt;/p&gt;

&lt;p&gt;$ lfs path2fid /mnt/lustre&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000000:0x2:0x0&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;All that is needed is to ensure that the ROOT/ inode stores this in the LMA.  This has the drawback that FID_SEQ_START is not currently exposed to clients and it fixes MDD_ROOT_INDEX_OID to a specific value (since it will be stored in the &quot;link&quot; xattr).&lt;/p&gt;

&lt;p&gt;The alternative is to expose some other SEQ:OID for the root FID.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12438">LU-838</key>
            <summary>&quot;lfs path2fid /mnt/lustre&quot; (ROOT) returns inode number</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</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="tappro">Mikhail Pershin</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>LB</label>
                    </labels>
                <created>Sat, 12 Nov 2011 07:22:14 +0000</created>
                <updated>Wed, 27 Feb 2013 21:08:19 +0000</updated>
                            <resolved>Thu, 21 Feb 2013 20:12:50 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>12</watches>
                                                                            <comments>
                            <comment id="22945" author="adilger" created="Sat, 12 Nov 2011 07:24:12 +0000"  >&lt;p&gt;Vitaly, what does your upgrade tool do for ROOT/?  Does it allocate a specific FID for ROOT/, or just pick an arbitrary one?&lt;/p&gt;</comment>
                            <comment id="23003" author="vitaly_fertman" created="Mon, 14 Nov 2011 06:05:25 +0000"  >&lt;p&gt;MDD_ROOT (&quot;ROOT&quot;) gets a new arbitrary fid (see mdd_root_rebuild()).&lt;br/&gt;
OSD_ROOT (&quot;/&quot;) is not changed.&lt;/p&gt;</comment>
                            <comment id="24047" author="adilger" created="Sat, 10 Dec 2011 00:52:20 +0000"  >&lt;p&gt;Alex, do you have any thoughts on this?  It appears there are already some changes in this area for the orion branch, and &lt;a href=&quot;http://review.whamcloud.com/#change,1822&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,1822&lt;/a&gt; is also messing with the local objects a bit.  How does the orion branch access the OSD &quot;/&quot; FID, and the MDT /ROOT FID in a common way between osd-ldiskfs and osd-zfs?  Almost anything is better than exporting the IGIF FID to clients.&lt;/p&gt;</comment>
                            <comment id="31609" author="tappro" created="Tue, 20 Mar 2012 15:03:17 +0000"  >&lt;p&gt;this is not solved well in orion, ROOT has predefined OID in FID_SEQ_LOCAL_FILE and that is exposed to client which is also not good because FLD knows nothing about such sequence, moreover that is not compatible with DNE as each MDS will have the same root FID. We need to solve this in master properly. Probably we might use also special sequence with different OIDs for each MDS and insert that sequence in FLD or have it hard-coded there.&lt;/p&gt;</comment>
                            <comment id="31631" author="adilger" created="Wed, 21 Mar 2012 00:17:27 +0000"  >&lt;p&gt;I&apos;m not sure why we would want a different FID for the root on each MDT?  These are separate directories, even I&apos;d they are striped for DNE Phase II. &lt;/p&gt;

&lt;p&gt;Having a real FID makes sense, and in Di&apos;s recent BRL patch it introduces a reserved FUD SEQ number for system FIDs, and this would be a perfect place for the Root FID I think. &lt;/p&gt;</comment>
                            <comment id="43597" author="adilger" created="Wed, 22 Aug 2012 02:21:50 +0000"  >&lt;p&gt;This behaviour has changed in orion, where it returns FID_SEQ_LOCAL_FILE:OSD_FS_ROOT_OID.  This is not necessarily better, since FID_SEQ_LOCAL_FILE objects along with many others should be blocked for anything above the MDD (see &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1518&quot; title=&quot;Missing/bad operations in mdd_{obf,dot_lustre}_obj_op causing LBUGs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1518&quot;&gt;&lt;del&gt;LU-1518&lt;/del&gt;&lt;/a&gt; for a host of problems this opens up).  Also, changing the FID for the root inode can cause other problems, because the clients will cache the old root IGIF FID and this could result in two different FIDs in the MDT and DLM.&lt;/p&gt;

&lt;p&gt;There was discussion about using FID_SEQ_SPECIAL:2 for the root object, and allowing clients to access this FID_SEQ.  The only other FID in this range is the FID_OID_SPECIAL_BFL which is used to lock the filesystem for renames.  Alternately, it could just be an arbitrary FID in the FID_SEQ_NORMAL range for each filesystem, and the initial lookup of &quot;/ROOT&quot; is done by name, and the FID is stored in the OSD/MDD for later reference.  Note that the Xyratex filesystem upgrade tool uses an arbitrary FID already.&lt;/p&gt;

&lt;p&gt;Making this a blocker for 2.4 so that it does not get forgotten before that release.&lt;/p&gt;</comment>
                            <comment id="46912" author="adilger" created="Thu, 25 Oct 2012 11:58:09 +0000"  >&lt;p&gt;Mike, was this bug fixed now to set the root FID to FID_SEQ_SPECIAL?  If yes, please include the bug number here and close.&lt;/p&gt;</comment>
                            <comment id="47704" author="tappro" created="Mon, 12 Nov 2012 18:39:17 +0000"  >&lt;p&gt;Andreas, it is not landed into master yet. I&apos;ll take care about.&lt;/p&gt;</comment>
                            <comment id="48516" author="tappro" created="Wed, 28 Nov 2012 23:21:14 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/4682&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/4682&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Patch switches mdd local file creation to the local_storate library instead of using md_local_file + dt_store_open, like that was done in Orion. That helps us to  unify the way we are creating local files and avoid problems of old way, e.g. layering violation, fixed fids and creation in system root only.&lt;/p&gt;

&lt;p&gt;Meanwhile the ROOT is created in FID_SEQ_SPECIAL sequence now and clients get its real FID but not IGIF, so inode/generation is hidden. Its FID is stored in OI like for other files and patch contains generic code to check FID in OI equal to the one in EA/dirent and fix OI if needed. See ORI-756 for details.&lt;/p&gt;</comment>
                            <comment id="49493" author="tappro" created="Thu, 20 Dec 2012 12:33:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2462&quot; title=&quot;debugfs doesn&amp;#39;t care about DIRENT_LUFID flag while inserting new entries&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2462&quot;&gt;&lt;del&gt;LU-2462&lt;/del&gt;&lt;/a&gt; was found by test 38 conf-sanity failure.&lt;/p&gt;</comment>
                            <comment id="49814" author="adilger" created="Mon, 31 Dec 2012 03:34:10 +0000"  >&lt;p&gt;Mike,&lt;br/&gt;
will the patch in &lt;a href=&quot;http://review.whamcloud.com/4682&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/4682&lt;/a&gt; address the following check:&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;#&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; LUSTRE_VERSION_CODE &amp;gt;= OBD_OCD_VERSION(2, 3, 90, 0)
#error &lt;span class=&quot;code-quote&quot;&gt;&quot;fix &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; before release&quot;&lt;/span&gt;
#endif
                /*
                 * there is one technical debt left in Orion:
                 * proper hanlding of named vs no-name objects.
                 * Llog objects have name always as they are placed in O/d/...
                 */
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (fid_seq(lu_object_fid(&amp;amp;o-&amp;gt;do_lu)) != FID_SEQ_LLOG) {
                        rc = dt_insert(env, root,
                                       (&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct dt_rec *)first_fid,
                                       (&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct dt_key *)dti-&amp;gt;dti_buf,
                                       th, BYPASS_CAPA, 1);
                        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (rc)
                                GOTO(out_trans, rc);
                }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="49815" author="yong.fan" created="Mon, 31 Dec 2012 05:49:19 +0000"  >&lt;p&gt;In LFSCK 1.5, all FIDs except for IDIF and some special ones which are marked as &quot;I_LUSTRE_NOSCRUB&quot; (for local root, for OI files themselves, and etc), they have FID &amp;lt;=&amp;gt; ino/gen mapping in the OI files. There are two cases for the &quot;ROOT&quot; FIDs (the &quot;/ROOT/.lustre&quot; is similar) exported to client:&lt;/p&gt;

&lt;p&gt;1) Upgrading cases.&lt;br/&gt;
For the existing old &quot;ROOT&quot; which was created before Lustre-2.4, the IGIF FID will be fixed to the &quot;ROOT&quot; object, and insert the IGIF FID to the &quot;ROOT&quot; LMA, and add &quot;IGIF &amp;lt;=&amp;gt; ion/gen&quot; mapping to the OI file. From now on, this fixed IGIF FID will be reserved for the &quot;ROOT&quot;, the client can still use the fixed IGIF FID to access the &quot;ROOT&quot; object after MDT file-level backup/restore.&lt;/p&gt;

&lt;p&gt;2) New formatted cases.&lt;br/&gt;
For the new &quot;ROOT&quot; which is created since Lustre-2.4, the &quot;&lt;/p&gt;
{ FID_SEQ_LOCAL_FILE, MDD_ROOT_INDEX_OID, 0 }
&lt;p&gt;&quot; FID will be fixed to the &quot;ROOT&quot; object, and related FID-in-LMA and FID mapping in OI file are similar as other normal FIDs.&lt;/p&gt;

&lt;p&gt;The initial OI scrub can guarantee that the &quot;ROOT&quot; FID to local ino/gen are valid, in spite of whether there will be MDT file-level backup/restore. So the original three issues described in this ticket description are all resolved in LFSCK 1.5.&lt;/p&gt;

&lt;p&gt;Tappro, I prefer to use LFSCK 1.5 to resolve the initial three issues you mentioned. As for other improvements in above discussion, please consider rebase your left patch(es) against LFSCK 1.5 patch. How do you think? Thanks!&lt;/p&gt;</comment>
                            <comment id="50025" author="di.wang" created="Sat, 5 Jan 2013 17:24:43 +0000"  >&lt;p&gt;Here is a new patch about root fid. &lt;a href=&quot;http://review.whamcloud.com/#change,4342&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,4342&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basically, it reserve 0xffffffffffff0000-0xfffffffffffffffe for root fids, the root fid of each MDT will be &lt;span class=&quot;error&quot;&gt;&amp;#91;0xffffffffffff0000 + mdt_index, 0, 0&amp;#93;&lt;/span&gt;, please have a look to avoid duplicate work here.&lt;/p&gt;</comment>
                            <comment id="50026" author="adilger" created="Sat, 5 Jan 2013 18:26:03 +0000"  >&lt;p&gt;Di, I&apos;m not sure why you made a new patch, and reserved new ROOT FIDs?  AFAIK There is only a singe root FID needed, and there is already MDD_ROOT_INDEX_OID reserved.  Coils you please explain?&lt;/p&gt;</comment>
                            <comment id="50027" author="di.wang" created="Sat, 5 Jan 2013 18:51:50 +0000"  >&lt;p&gt;Because each MDT should a ROOT dir, though only ROOT on MDT0 will be visible on client side, but I thought in the future, some other tools might need access these ROOT objects, and we might need FIDs for these ROOT dirs? Hmm I might be wrong here, probably these roots might always be special objects, and invisible from outside. I will revert these changes. &lt;/p&gt;

</comment>
                            <comment id="50043" author="tappro" created="Sun, 6 Jan 2013 10:07:34 +0000"  >&lt;p&gt;I have no objections about lfsck to fix this if it does that. Probably this ticket shouldn&apos;t be blocker then.&lt;/p&gt;</comment>
                            <comment id="50048" author="di.wang" created="Sun, 6 Jan 2013 23:18:55 +0000"  >&lt;p&gt;I updated the patch &lt;a href=&quot;http://review.whamcloud.com/#change,4342&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,4342&lt;/a&gt; Only 1 root fid, please have a look. Thanks&lt;/p&gt;</comment>
                            <comment id="50179" author="di.wang" created="Tue, 8 Jan 2013 21:21:40 +0000"  >&lt;p&gt;Mike: Do you mind to land this patch after DNE? or you can just assign this ticket to me? I will land this after DNE is landed, otherwise I need rebase my patch again. Thanks!&lt;/p&gt;</comment>
                            <comment id="50181" author="tappro" created="Tue, 8 Jan 2013 22:44:25 +0000"  >&lt;p&gt;I will need to update it after lfsck 1.5 in any case, I am fine to rework and land it after DNE too, not big problem.&lt;/p&gt;</comment>
                            <comment id="51994" author="adilger" created="Thu, 7 Feb 2013 15:54:26 +0000"  >&lt;p&gt;Updated patch from DNE series is &lt;a href=&quot;http://review.whamcloud.com/5257&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5257&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="52049" author="adilger" created="Fri, 8 Feb 2013 13:32:14 +0000"  >&lt;p&gt;Mike, after the landing of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2240&quot; title=&quot;implement index range lookup for osd-zfs.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2240&quot;&gt;&lt;del&gt;LU-2240&lt;/del&gt;&lt;/a&gt;, what is left to be done in this bug?&lt;/p&gt;</comment>
                            <comment id="52088" author="tappro" created="Fri, 8 Feb 2013 23:04:46 +0000"  >&lt;p&gt;Andreas, it becomes just &quot;use local_storage library to create local file&quot; bug. I&apos;ve updated patch already and testing it now.&lt;/p&gt;</comment>
                            <comment id="52642" author="tappro" created="Mon, 18 Feb 2013 12:46:22 +0000"  >&lt;p&gt;I think this bug is fixed by Di patches, Di, is that right? However my patch contains another good fix - create all local files in uniform way using local_storage library and remove old md_local_file lib as well. We can close this bug and open new one, not blocker but major. Or we can edit this one&lt;/p&gt;</comment>
                            <comment id="52839" author="di.wang" created="Thu, 21 Feb 2013 17:59:58 +0000"  >&lt;p&gt;Yes, the rootfid patch should fix this problem. But lfs path2fid /mnt/lustre still return IGIF for upgraded FS, and it only return the new seq root FID for new formatted FS.&lt;/p&gt;

&lt;p&gt;I also think we need add some fid2path tests in those upgrade test (conf-sanity 32a/b/c) to verify this in the upgraded FS, and I can add it in another patch(fid2path fixes for DNE). Hmm, we probably should even run the whole sanity/conf-sanity tests on upgraded FS, but this is totally unrelated with this ticket.&lt;/p&gt;</comment>
                            <comment id="52847" author="jlevi" created="Thu, 21 Feb 2013 20:12:50 +0000"  >&lt;p&gt;Closing this ticket per Di&apos;s comments.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="16442">LU-2240</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14998">LU-1550</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="16892">LU-2462</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="17730">LU-2886</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_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzv31b:</customfieldvalue>

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