<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:57: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-13044] WBC3: remove the whole subtree on MDT already deleted in the client WBC cache</title>
                <link>https://jira.whamcloud.com/browse/LU-13044</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13021&quot; title=&quot;WBC&#65306;different flush modes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13021&quot;&gt;LU-13021&lt;/a&gt;, we have designed three flush mode for WBC.&lt;/p&gt;

&lt;p&gt;In&#160;WBC_FLUSH_AGE_LOCK_HOLD flush mode, to optimize the unlink() operation, we can also do unlink via background flush -&amp;gt;write_inode(). The design could be as follows:&lt;br/&gt;
 When unlink &apos;f&apos; under the directory &apos;dir&apos; (&apos;f&apos; and &apos;dir&apos; are all protected under a root WBC EX lock):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Each directory dentry has a list &lt;em&gt;L&lt;/em&gt; to maintain its children files or directories which have already flushed to MDT, but removed from WBC cache (MemFS) later;&lt;/li&gt;
	&lt;li&gt;If &apos;f&apos; is not flushed to MDT (!Sync(S) state), remove it directly from cache (MemFS currently);&lt;/li&gt;
	&lt;li&gt;Otherwise, add a item which contains the name of the unlinking file into &lt;em&gt;L&lt;/em&gt; of &apos;dir&apos;; remove it from cache; And then mark &apos;dir&apos; inode as dirty which will be flushed later;&lt;/li&gt;
	&lt;li&gt;When Linux kernel flushes an inode via -&amp;gt;write_inode(), if found that the directory &apos;dir&apos; has some children files or directories which are already synced to MDT but unlinked locally in cache, it must do a unlink for these files or directories on MDT;&lt;/li&gt;
	&lt;li&gt;When MDT received an unlink request, if found it is not an empty directory (nlink &amp;gt; 0?), it must remove this whole subtree. This can be done Asynchronously:
	&lt;ul&gt;
		&lt;li&gt;move this directory into lost+found?, and then reply to the client;&lt;/li&gt;
		&lt;li&gt;launch a daemon thread on MDT dedicate to unlink this kind of directories under lost+found.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="57534">LU-13044</key>
            <summary>WBC3: remove the whole subtree on MDT already deleted in the client WBC cache</summary>
                <type id="7" iconUrl="https://jira.whamcloud.com/images/icons/issuetypes/task_agile.png">Technical task</type>
                            <parent id="51932">LU-10938</parent>
                                    <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="qian_wc">Qian Yingjin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 4 Dec 2019 03:34:15 +0000</created>
                <updated>Mon, 10 Jan 2022 01:32:40 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="259127" author="adilger" created="Wed, 4 Dec 2019 05:11:26 +0000"  >&lt;p&gt;Another option would be to send one or more &lt;tt&gt;MDS_RMFID&lt;/tt&gt; RPC with the FIDs of the files in the tree, starting at the bottom. One thing to be careful of is that RMFID will delete all links to the file, so we would need a slight modification to allow removing just some links.  &lt;/p&gt;</comment>
                            <comment id="259128" author="qian_wc" created="Wed, 4 Dec 2019 05:26:39 +0000"  >&lt;p&gt;Could MDS_RMFID remove a whole subtree on MDT?&lt;/p&gt;

&lt;p&gt;For example, when flush a dirty directory /mnt/lustre/wbc/batch:&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir1/a&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir1/b&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir1/c&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir2/a&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir1/dir3/dir4/bb&lt;/p&gt;

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/f1&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/f3&lt;/p&gt;

&lt;p&gt;these files are all removed from client WBC cache, but already flushed to MDT.&lt;/p&gt;

&lt;p&gt;At this time, it only needs to send unlink requests for its children files or directories:&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir1&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/dir2&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/f1&lt;/p&gt;

&lt;p&gt;/mnt/lustre/wbc/batch/f3&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;It does not need to start at the bottom for the best of the optimization.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="259129" author="adilger" created="Wed, 4 Dec 2019 06:02:43 +0000"  >&lt;p&gt;The reason I suggest it needs to start at the bottom is that if removing a directory it would be best if the directory is already empty.  Otherwise, there is a real danger if RMFID is allowed to remove the whole directory of entries.  In general, the ability to remove a whole directory recursively is dangerous and should be restricted as much as possible.&lt;/p&gt;</comment>
                            <comment id="259162" author="adilger" created="Wed, 4 Dec 2019 15:47:29 +0000"  >&lt;p&gt;I think that having a dedicated &quot;rm -r&quot; optimization is a much lower priority than the batched RPCs support in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13045&quot; title=&quot;WBC2: batch metadata update&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13045&quot;&gt;LU-13045&lt;/a&gt;. Once we have batched RPCs then we will already be able to unlink files very quickly over the network. It also isn&apos;t clear that having the EX lock on an &lt;b&gt;existing&lt;/b&gt; directory necessarily means that this client is the only one accessing the subtree. &lt;/p&gt;</comment>
                            <comment id="318934" author="gerrit" created="Tue, 23 Nov 2021 03:42:27 +0000"  >&lt;p&gt;&quot;Yingjin Qian &amp;lt;qian@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45640&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45640&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13044&quot; title=&quot;WBC3: remove the whole subtree on MDT already deleted in the client WBC cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13044&quot;&gt;LU-13044&lt;/a&gt; wbc: delay file removal for keep flush mode&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 8e3f2c7731f10903359acb1140d282c5f37b395f&lt;/p&gt;</comment>
                            <comment id="318936" author="gerrit" created="Tue, 23 Nov 2021 03:42:29 +0000"  >&lt;p&gt;&quot;Yingjin Qian &amp;lt;qian@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45642&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45642&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13044&quot; title=&quot;WBC3: remove the whole subtree on MDT already deleted in the client WBC cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13044&quot;&gt;LU-13044&lt;/a&gt; wbc: subtree removal for keep flush mode&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 67060cc94134971e37dce2ca82c404cb76aad209&lt;/p&gt;</comment>
                            <comment id="318937" author="gerrit" created="Tue, 23 Nov 2021 03:42:30 +0000"  >&lt;p&gt;&quot;Yingjin Qian &amp;lt;qian@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45643&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45643&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13044&quot; title=&quot;WBC3: remove the whole subtree on MDT already deleted in the client WBC cache&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13044&quot;&gt;LU-13044&lt;/a&gt; wbc: async subtree removal for keep flush mode&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 17ea03301e87f3192e51786a0ae5464c0bab00ab&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </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|i00qdr:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>