<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:13:37 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-14886] WBC: Handle WB_SYNC_NONE properly</title>
                <link>https://jira.whamcloud.com/browse/LU-14886</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Maloo testing reports the following panic:&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;
LustreError: 7:0:(wbc.c:866:wbc_inode_flush_lockdrop()) ASSERTION( !wbc_inode_has_protected(wbci) ) failed: WBC flags: 85 inode 00000000982468e8
[ 1026.402024] LustreError: 7:0:(wbc.c:866:wbc_inode_flush_lockdrop()) LBUG
[ 1026.404520] Pid: 7, comm: kworker/u4:0 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021
[ 1026.407533] Call Trace TBD:
[ 1026.408826] [&amp;lt;0&amp;gt;] libcfs_call_trace+0x6f/0x90 [libcfs]
[ 1026.410524] [&amp;lt;0&amp;gt;] lbug_with_loc+0x43/0x80 [libcfs]
[ 1026.412388] [&amp;lt;0&amp;gt;] wbc_inode_flush_lockdrop+0xed/0xf0 [lustre]
[ 1026.414304] [&amp;lt;0&amp;gt;] wbc_write_inode+0x184/0x1a0 [lustre]
[ 1026.416076] [&amp;lt;0&amp;gt;] __writeback_single_inode+0x2da/0x370
[ 1026.417803] [&amp;lt;0&amp;gt;] writeback_sb_inodes+0x1e7/0x440
[ 1026.419369] [&amp;lt;0&amp;gt;] __writeback_inodes_wb+0x5f/0xc0
[ 1026.420905] [&amp;lt;0&amp;gt;] wb_writeback+0x25b/0x2f0
[ 1026.422171] [&amp;lt;0&amp;gt;] wb_workfn+0x192/0x4a0
[ 1026.423350] [&amp;lt;0&amp;gt;] process_one_work+0x1a7/0x360
[ 1026.424651] [&amp;lt;0&amp;gt;] worker_thread+0x30/0x390
[ 1026.425884] [&amp;lt;0&amp;gt;] kthread+0x112/0x130
[ 1026.427060] [&amp;lt;0&amp;gt;] ret_from_fork+0x35/0x40
[ 1026.428258] Kernel panic - not syncing: LBUG
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The panic is introduced by. a write followed a sync call.&lt;br/&gt;
After analyzed, we found that sync call will try to write the dirty inodes with WB_SYNC_NONE mode:&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;
writeback_sb_inodes()
           &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ((inode-&amp;gt;i_state &amp;amp; I_SYNC) &amp;amp;&amp;amp; wbc.sync_mode != WB_SYNC_ALL) {
			/*
			 * If &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; inode is locked &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; writeback and we are not
			 * doing writeback-&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;-data-integrity, move it to
			 * b_more_io so that writeback can proceed with the
			 * other inodes on s_io.
			 *
			 * We&apos;ll have another go at writing back &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; inode
			 * when we completed a full scan of b_io.
			 */
			spin_unlock(&amp;amp;inode-&amp;gt;i_lock);
			requeue_io(inode, wb);
			trace_writeback_sb_inodes_requeue(inode);
			&lt;span class=&quot;code-keyword&quot;&gt;continue&lt;/span&gt;;
		}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;When kernel is flushing the parent inode P (with I_SYNC flags), sync with WB_SYNC_NONE (in the sync call context) will skip this inode, move it to b_more_io so that writeback can proceed with the other inodes on s_io.&lt;/p&gt;

&lt;p&gt;However, if the parent inode is not flushed to the server, we can not flush the children inodes under the directory. This is the reason that triggers the panic.&lt;br/&gt;
Thus we need to handle the WB_SYNC_NONE sync mode carefully.&lt;/p&gt;</description>
                <environment></environment>
        <key id="65383">LU-14886</key>
            <summary>WBC: Handle WB_SYNC_NONE properly</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="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="qian_wc">Qian Yingjin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 26 Jul 2021 09:43:22 +0000</created>
                <updated>Mon, 10 Jan 2022 01:32:40 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="308627" author="gerrit" created="Wed, 28 Jul 2021 04:04:18 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/44408&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/44408&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14886&quot; title=&quot;WBC: Handle WB_SYNC_NONE properly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14886&quot;&gt;LU-14886&lt;/a&gt; wbc: eliminate the dependency during flush&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 0e5b357c0f010c54deb3b38b78cc31a622abd924&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|i0205j:</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>