<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:16:21 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-15207] ASSERTION( !cfs_hash_is_rehashing(hs)</title>
                <link>https://jira.whamcloud.com/browse/LU-15207</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;
cfs_hash_rehash(struct cfs_hash *hs, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; do_rehash)
{
...
	hs-&amp;gt;hs_rehash_bits = rc;
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!do_rehash) {
		&lt;span class=&quot;code-comment&quot;&gt;/* launch and &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; */&lt;/span&gt;
		queue_work(cfs_rehash_wq, &amp;amp;hs-&amp;gt;hs_rehash_work);
		cfs_hash_unlock(hs, 1);
		&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt;;
}

cfs_hash_rehash_cancel(struct cfs_hash *hs)
{
	LASSERT(cfs_hash_with_rehash(hs));
	cancel_work_sync(&amp;amp;hs-&amp;gt;hs_rehash_work);
}

cfs_hash_for_each_enter(struct cfs_hash *hs)
{
...
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (cfs_hash_is_rehashing(hs))
		cfs_hash_rehash_cancel(hs);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;if we enter iteration (cfs_hash_for_each_enter()) and find rehashing scheduled or in progress (hs_rehash_bits != 0), then we want to cancel that work using cancel_work_sync().&lt;br/&gt;
but if the work hasn&apos;t started yet then who would reset hs_rehash_bits back to 0?&lt;/p&gt;

&lt;p&gt;a trivial test demonstrates this:&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;static&lt;/span&gt; struct workqueue_struct *test_rehash_wq;
struct work_struct test_rehash_work;
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;volatile&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; test_var = 0;
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; void test_worker(struct work_struct *work)
{
       test_var = 0;
}
void work_test(void)
{
       test_rehash_wq = alloc_workqueue(&lt;span class=&quot;code-quote&quot;&gt;&quot;test&quot;&lt;/span&gt;, WQ_SYSFS, 4);
       INIT_WORK(&amp;amp;test_rehash_work, test_worker);
       test_var = 1;
       queue_work(test_rehash_wq, &amp;amp;test_rehash_work);
       cancel_work_sync(&amp;amp;test_rehash_work);
       LASSERT(test_var == 0);
       destroy_workqueue(test_rehash_wq);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="67131">LU-15207</key>
            <summary>ASSERTION( !cfs_hash_is_rehashing(hs)</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="bzzz">Alex Zhuravlev</assignee>
                                    <reporter username="bzzz">Alex Zhuravlev</reporter>
                        <labels>
                            <label>LTS15</label>
                    </labels>
                <created>Thu, 11 Nov 2021 06:17:49 +0000</created>
                <updated>Thu, 30 Nov 2023 03:33:56 +0000</updated>
                            <resolved>Sat, 11 Jun 2022 15:31:56 +0000</resolved>
                                    <version>Upstream</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="317965" author="bzzz" created="Thu, 11 Nov 2021 06:25:08 +0000"  >&lt;p&gt;seems to be introduced with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9859&quot; title=&quot;libcfs simplification&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9859&quot;&gt;LU-9859&lt;/a&gt; libcfs: use a workqueue for rehash work.&lt;/p&gt;</comment>
                            <comment id="317968" author="gerrit" created="Thu, 11 Nov 2021 08:24:22 +0000"  >&lt;p&gt;&quot;Alex Zhuravlev &amp;lt;bzzz@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/45533&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45533&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15207&quot; title=&quot;ASSERTION( !cfs_hash_is_rehashing(hs)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15207&quot;&gt;&lt;del&gt;LU-15207&lt;/del&gt;&lt;/a&gt; libcfs: reset hs_rehash_bits&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 2dc2b3978b840f41d3544336a9acebedba467740&lt;/p&gt;</comment>
                            <comment id="337392" author="gerrit" created="Sat, 11 Jun 2022 05:32:03 +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/45533/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/45533/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15207&quot; title=&quot;ASSERTION( !cfs_hash_is_rehashing(hs)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15207&quot;&gt;&lt;del&gt;LU-15207&lt;/del&gt;&lt;/a&gt; libcfs: reset hs_rehash_bits&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 9257f24dfdf9f0a68512fce52d79064f78d9dc88&lt;/p&gt;</comment>
                            <comment id="337494" author="pjones" created="Sat, 11 Jun 2022 15:31:56 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                            <comment id="394767" author="gerrit" created="Wed, 29 Nov 2023 18:04:56 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/53283&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/53283&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-15207&quot; title=&quot;ASSERTION( !cfs_hash_is_rehashing(hs)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-15207&quot;&gt;&lt;del&gt;LU-15207&lt;/del&gt;&lt;/a&gt; libcfs: reset hs_rehash_bits&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_15&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: f57c484fa7a15ab97fe44b6bd88d598fbcfec622&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|i029nr:</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>