<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:33:41 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-10283] changelog entries for creates in striped directories use stripe FID as pfid</title>
                <link>https://jira.whamcloud.com/browse/LU-10283</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;When we create files in striped directories the changelog entries emitted use the parent stripe FID (instead of the parent dir FID) as the pfid for the create:&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;m:lustre# lfs mkdir -c2 d0
m:lustre# lfs path2fid d0
[0x200000402:0xf9f:0x0]
m:lustre# lfs getdirstripe d0
lmv_stripe_count: 2 lmv_stripe_offset: 0 lmv_hash_type: fnv_1a_64
mdtidx&#160;&#160; &#160;&#160;&#160; &#160; FID[seq:oid:ver]
&#160;&#160;&#160;&#160; 0&#160;&#160; &#160;&#160;&#160; &#160; [0x200000400:0x3d3:0x0]&#160;&#160; &#160;&#160;&#160; &#160;
&#160;&#160;&#160;&#160; 1&#160;&#160; &#160;&#160;&#160; &#160; [0x240000401:0x3d3:0x0]&#160;&#160; &#160;&#160;&#160; &#160;
m:lustre# touch d0/f{0,1}
m:lustre# lfs changelog lustre-MDT0000
10753 02MKDIR 14:19:40.273195957 2017.11.27 0x0 t=[0x200000402:0xf9f:0x0] j=lfs.0 p=[0x200000007:0x1:0x0] d0
10754 01CREAT 14:20:08.243388795 2017.11.27 0x0 t=[0x200000402:0xfa0:0x0] j=touch.0 p=[0x200000400:0x3d3:0x0] f1
10755 11CLOSE 14:20:08.245569226 2017.11.27 0x42 t=[0x200000402:0xfa0:0x0] j=touch.0
m:lustre# lfs changelog lustre-MDT0001
11883 01CREAT 14:20:08.240982376 2017.11.27 0x0 t=[0x240000402:0x111f:0x0] j=touch.0 p=[0x240000401:0x3d3:0x0] f0
11884 11CLOSE 14:20:08.242496774 2017.11.27 0x42 t=[0x240000402:0x111f:0x0] j=touch.0
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This confuses &lt;tt&gt;lustre_rsync&lt;/tt&gt;. I wonder if we should fix this.&lt;/p&gt;</description>
                <environment></environment>
        <key id="49443">LU-10283</key>
            <summary>changelog entries for creates in striped directories use stripe FID as pfid</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="nangelinas">Nikitas Angelinas</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Nov 2017 15:42:27 +0000</created>
                <updated>Sat, 13 Jan 2024 02:48:09 +0000</updated>
                            <resolved>Wed, 13 Dec 2023 15:08:58 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>16</watches>
                                                                            <comments>
                            <comment id="214679" author="jhammond" created="Mon, 27 Nov 2017 15:45:38 +0000"  >&lt;p&gt;Thomas, Henri, Quentin,&lt;/p&gt;

&lt;p&gt;Does robinhood handle this correctly?&lt;/p&gt;</comment>
                            <comment id="214776" author="adilger" created="Tue, 28 Nov 2017 04:09:40 +0000"  >&lt;p&gt;It seems to me that returning the FID of the shard is not the best for the ChangeLog, because the details of the directory striping should not be exposed in this way. The striping of the directory may change over time, and the target directory may not have the same striping either. &lt;/p&gt;

&lt;p&gt;If &#8220;&lt;tt&gt;lfs fid2path &lt;span class=&quot;error&quot;&gt;&amp;#91;shard FID&amp;#93;&lt;/span&gt;&lt;/tt&gt;&#8221; returns the same parent path for all of the shards, then this detail should not be totally evident to &lt;tt&gt;lustre_rsync&lt;/tt&gt;, but any tools that are comparing the parent directories by FID may think that these two files were created in different directories. &lt;/p&gt;

&lt;p&gt;Thoughts on how to fix this? Since each shard stores the LMV EA with the parent FID. it should be possible to log the proper parent FID into the ChangeLog, but I&#8217;m wondering if we might lose something else if we do that?&lt;/p&gt;</comment>
                            <comment id="214812" author="jhammond" created="Tue, 28 Nov 2017 14:19:06 +0000"  >&lt;p&gt;&amp;gt; If &#8220;lfs fid2path &lt;span class=&quot;error&quot;&gt;&amp;#91;shard FID&amp;#93;&lt;/span&gt;&#8221; returns the same parent path for all of the shards, then this detail should not be totally evident to lustre_rsync, but any tools that are comparing the parent directories by FID may think that these two files were created in different directories.&lt;/p&gt;

&lt;p&gt;Yes, &quot;lfs fid2path &lt;span class=&quot;error&quot;&gt;&amp;#91;shard FID&amp;#93;&lt;/span&gt;&quot; does return the parent path. However there are some cases in lustre_rsync where the parent path does not exist in the archive, so we create the file in .lustrerepl and store the tfid, pfid, and name in the status log. Then if lustre_rsync later sees a rename on the pfid then it moves all saved files with matching pfid from the .lustrerepl directory to the rename destination in the target archive.&lt;/p&gt;</comment>
                            <comment id="215057" author="jhammond" created="Thu, 30 Nov 2017 20:49:34 +0000"  >&lt;p&gt;All&#244;? Any comment from the RBH developers?&lt;/p&gt;</comment>
                            <comment id="215112" author="tl-cea" created="Fri, 1 Dec 2017 08:12:28 +0000"  >&lt;p&gt;Current rbh implementation would expect the directory fid, not the shard fid which is somehow a lustre internal.&lt;/p&gt;

&lt;p&gt;One could say that the shard fid could indicate the MDT where entries are located, but this information is already given by the MDT stream that has the log record.&lt;/p&gt;</comment>
                            <comment id="232032" author="olaf" created="Thu, 16 Aug 2018 08:03:42 +0000"  >&lt;p&gt;From a DMF perspective we&apos;d also expect the directory fid to be reported.&lt;/p&gt;</comment>
                            <comment id="255369" author="adilger" created="Wed, 25 Sep 2019 12:32:49 +0000"  >&lt;p&gt;Discussed at LAD&apos;19 is that the ChangeLog could store the actual directory FID rather than the shard FID.  In general, the shard FID is not very useful to userspace, since the directory striping should be transparent to users, and if the directory is restriped the shards could change anyway.  On the MDTs where the operation is being done, it should be possible to know that the operation is done in a striped directory and what the actual directory FID is, so this should be possible to implement.  It &lt;em&gt;shouldn&apos;t&lt;/em&gt; cause problems for existing Changelog consumers, since it wouldn&apos;t be different than operations within a local directory.&lt;/p&gt;</comment>
                            <comment id="324871" author="olaf" created="Wed, 2 Feb 2022 10:42:10 +0000"  >&lt;p&gt;We are now encountering this in the field. Are there any plans to address this?&lt;/p&gt;</comment>
                            <comment id="375471" author="gerrit" created="Wed, 14 Jun 2023 22:09:33 +0000"  >&lt;p&gt;&quot;Nikitas Angelinas &amp;lt;nikitas.angelinas@hpe.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51322&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51322&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10283&quot; title=&quot;changelog entries for creates in striped directories use stripe FID as pfid&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10283&quot;&gt;&lt;del&gt;LU-10283&lt;/del&gt;&lt;/a&gt; mdd: fix parent FID in changelog of striped directory&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 80258995e44b9911deb54e9d914443a98a680020&lt;/p&gt;</comment>
                            <comment id="375472" author="nangelinas" created="Wed, 14 Jun 2023 22:31:41 +0000"  >&lt;p&gt;I have submitted a patch from Dmitry Ivanov that seems to address this issue, by detecting whether a directory is striped using XATTR_NAME_LMV and if so, using mdd_parent_fid() to obtain the real parent FID for use in the generated changelog record:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&amp;#35; git describe&lt;br/&gt;
v2_15_56-1-g80258995e4&lt;br/&gt;
&amp;#35; lfs mkdir -i -1 -c 2 /mnt/lustre/testdir0&lt;br/&gt;
&amp;#35; lctl get_param mdd.*.changelog_striped_dir_real_pfid&lt;br/&gt;
mdd.lustre-MDT0000.changelog_striped_dir_real_pfid=0&lt;br/&gt;
mdd.lustre-MDT0001.changelog_striped_dir_real_pfid=0&lt;br/&gt;
&amp;#35; lfs getdirstripe /mnt/lustre/testdir0&lt;br/&gt;
lmv_stripe_count: 2 lmv_stripe_offset: 0 lmv_hash_type: crush&lt;br/&gt;
mdtidx FID&lt;span class=&quot;error&quot;&gt;&amp;#91;seq:oid:ver&amp;#93;&lt;/span&gt;&lt;br/&gt;
0 &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x2:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
1 &lt;span class=&quot;error&quot;&gt;&amp;#91;0x240000401:0x2:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;#35; lfs path2fid /mnt/lustre/testdir0&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x1:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
&amp;#35; touch /mnt/lustre/testdir0/testfile0&lt;br/&gt;
&amp;#35; lfs changelog lustre-MDT0000; lfs changelog lustre-MDT0001&lt;br/&gt;
...&lt;br/&gt;
2 01CREAT 21:46:35.984819711 2023.06.14 0x0 t=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x2:0x0&amp;#93;&lt;/span&gt; j=touch.0 ef=0xf u=0:0 nid=0@lo p=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x2:0x0&amp;#93;&lt;/span&gt; testfile0&lt;br/&gt;
3 11CLOSE 21:46:36.028827790 2023.06.14 0x42 t=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x2:0x0&amp;#93;&lt;/span&gt; j=touch.0 ef=0xf u=0:0 nid=0@lo&lt;br/&gt;
&amp;#35; lctl set_param mdd.*.changelog_striped_dir_real_pfid=1&lt;br/&gt;
mdd.lustre-MDT0000.changelog_striped_dir_real_pfid=1&lt;br/&gt;
mdd.lustre-MDT0001.changelog_striped_dir_real_pfid=1&lt;br/&gt;
&amp;#35; lctl get_param mdd.*.changelog_striped_dir_real_pfid&lt;br/&gt;
mdd.lustre-MDT0000.changelog_striped_dir_real_pfid=1&lt;br/&gt;
mdd.lustre-MDT0001.changelog_striped_dir_real_pfid=1&lt;br/&gt;
&amp;#35; touch /mnt/lustre/testdir0/testfile1&lt;br/&gt;
&amp;#35; lfs changelog lustre-MDT0000; lfs changelog lustre-MDT0001&lt;br/&gt;
...&lt;br/&gt;
2 01CREAT 21:46:35.984819711 2023.06.14 0x0 t=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x2:0x0&amp;#93;&lt;/span&gt; j=touch.0 ef=0xf u=0:0 nid=0@lo p=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x2:0x0&amp;#93;&lt;/span&gt; testfile0&lt;br/&gt;
3 11CLOSE 21:46:36.028827790 2023.06.14 0x42 t=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x2:0x0&amp;#93;&lt;/span&gt; j=touch.0 ef=0xf u=0:0 nid=0@lo&lt;br/&gt;
4 01CREAT 21:47:08.772277807 2023.06.14 0x0 t=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x3:0x0&amp;#93;&lt;/span&gt; j=touch.0 ef=0xf u=0:0 nid=0@lo p=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x1:0x0&amp;#93;&lt;/span&gt; testfile1&lt;br/&gt;
5 11CLOSE 21:47:08.831376478 2023.06.14 0x42 t=&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000402:0x3:0x0&amp;#93;&lt;/span&gt; j=touch.0 ef=0xf u=0:0 nid=0@lo&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Sergey Cheremencev had shown that this patch can result in an increased number of cross-MDT RPCs, so the added functionality needs to be explicitly enabled by setting the changelog_striped_dir_real_pfid tunable and is disabled by default. There have been some discussions re the possibility of avoiding the extra cross-MDT RPCs by obtaining the real parent fid from the parent&apos;s REMOTE_PARENT_DIR entry&apos;s linkEA, but Vitaly reckoned this would still require some RPCs in cases where the parent&apos;s fid is in a different MDT. Unfortunately, I am not sure if this is accurate and/or if we could add any additional information to the REMOTE_PARENT_DIR entries to use them for avoiding the extra RPCs in this case?&lt;/p&gt;</comment>
                            <comment id="378233" author="olaf" created="Tue, 11 Jul 2023 09:34:23 +0000"  >&lt;p&gt;In his review comments Andreas worries about compatibility with tools that rely on the stripe FID being returned in the changelog records. Does anyone know whether such tools actually exist?&lt;/p&gt;</comment>
                            <comment id="378238" author="courrier" created="Tue, 11 Jul 2023 11:11:59 +0000"  >&lt;p&gt;As far as robinhood is concerned, it assumes that the pfid in the changelog record is the FID of the parent directory. We didn&apos;t catch this issue in the first implementation of the new changelog reader of Robinhood 4. Robinhood doesn&apos;t manipulate shard FIDs. So from its perspective, this would result in a bug. The fix in patch 51322 would work for us. A tunable might be useful to be able to at least know which version of the changelog we are reading (to know whether the pfid is the actual FID of the directory or not). A new record in the changelog would be fine as well.&lt;/p&gt;</comment>
                            <comment id="380789" author="adilger" created="Mon, 31 Jul 2023 20:53:52 +0000"  >&lt;p&gt;If everyone considers this a bug, I&apos;d be fine to fix the bug by default, and just have a tunable to revert to the previous behavior in the field if some customer specifically needs it.  I suspect there will be few users for this, and the tunable can be marked for removal in some future release.&lt;/p&gt;</comment>
                            <comment id="380877" author="olaf" created="Tue, 1 Aug 2023 10:57:40 +0000"  >&lt;p&gt;My vote is &quot;bug to be fixed by default&quot;.&lt;/p&gt;</comment>
                            <comment id="396586" author="gerrit" created="Wed, 13 Dec 2023 12:20:06 +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/+/51322/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51322/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-10283&quot; title=&quot;changelog entries for creates in striped directories use stripe FID as pfid&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-10283&quot;&gt;&lt;del&gt;LU-10283&lt;/del&gt;&lt;/a&gt; mdd: fix parent FID in changelog of striped directory&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3554923af9e3260235865d90949ecd2924bbbc0e&lt;/p&gt;</comment>
                            <comment id="396628" author="pjones" created="Wed, 13 Dec 2023 15:08:58 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="49413">LU-10265</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56464">LU-12574</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|hzzo9r:</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>