<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:31:58 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-17022] Clean up flags and locking in struct obd_device</title>
                <link>https://jira.whamcloud.com/browse/LU-17022</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;struct obd_device contains a number of flags using a single-bit bit-field.&#160; These require a spinlock to ensure atomic updates as it documented in a comment.&#160; However many places update these flags without a lock. Conversely sometime the lock is taken for only reading the flag, which provides no value.&lt;/p&gt;

&lt;p&gt;The common practice in Linux is to use set_bit() etc which is atomic and requires no locking.&#160; The flags should be converted.&#160; Where a flag is both checked and set within a spinlock region, test_and_set_bit() or test_and_clear_bit() can be used.&lt;/p&gt;

&lt;p&gt;The lock in question -&amp;gt; obd_dev_lock, is documented only as protecting these flag bit, but it actually protects a number of lists and other things.&#160; This should be documented.&lt;/p&gt;

&lt;p&gt;One of the fields it protects is&#160; obd_conn_inprogress which would work better as an atomic_t, and which is waited for with a &apos;yield()&apos; loop which is not good practice.&#160; This should use wait_var_event etc.&lt;/p&gt;

&lt;p&gt;The lock is also held across code that does not need locking, and this should be removed.&lt;/p&gt;

&lt;p&gt;The name of the lock is easily confused with the global lock &quot;obd_dev_lock&quot;.&#160; One of these should be renamed.&#160; Maybe obd_devs_lock for the global.&lt;/p&gt;

&lt;p&gt;struct obd_export has similar issues deserving attention.&lt;/p&gt;

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

&lt;p&gt;I propose to submit a number of patches to achieve all this with all but the last marked &quot;trivial&quot; so the heavy testing is only run on the complete set.&lt;/p&gt;</description>
                <environment></environment>
        <key id="77381">LU-17022</key>
            <summary>Clean up flags and locking in struct obd_device</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <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="neilb">Neil Brown</assignee>
                                    <reporter username="neilb">Neil Brown</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Aug 2023 06:37:44 +0000</created>
                <updated>Thu, 14 Sep 2023 18:15:53 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="381773" author="gerrit" created="Wed, 9 Aug 2023 06:56:58 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51899&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51899&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: start converting obd flags to a bitmap&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 38dcb6bf170276d9e687f869ce7c41f3ea6ddd7e&lt;/p&gt;</comment>
                            <comment id="381774" author="gerrit" created="Wed, 9 Aug 2023 06:56:59 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51900&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51900&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: convert recovery flags to bit ops&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 735b3c94b0b0241f4fe8a0eaf44b648d5e8efbc6&lt;/p&gt;</comment>
                            <comment id="381775" author="gerrit" created="Wed, 9 Aug 2023 06:56:59 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51901&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51901&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: convert more flags to bitops&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 084d3a0ad425f7212bcf9e44ca10834bbd5bce1f&lt;/p&gt;</comment>
                            <comment id="381776" author="gerrit" created="Wed, 9 Aug 2023 06:57:00 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51902&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51902&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: convert still more flags to bitops&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 6555724e093ea4cfafd6ef6f46f758e316d3df3c&lt;/p&gt;</comment>
                            <comment id="381777" author="gerrit" created="Wed, 9 Aug 2023 06:57:01 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51903&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51903&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: change further flags to bitops&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 10b672c16fee0c46e7ba038f186837b8a224364f&lt;/p&gt;</comment>
                            <comment id="381778" author="gerrit" created="Wed, 9 Aug 2023 06:57:02 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51904&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51904&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: change 4 flags to bitops&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fd0478cd4d4e1a1126406496dd9538d011e899ba&lt;/p&gt;</comment>
                            <comment id="381779" author="gerrit" created="Wed, 9 Aug 2023 06:57:03 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51905&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51905&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: convert remaining flags to bitops&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 3297364a2a382173e28b0cd1ae078d0a4cb2aa58&lt;/p&gt;</comment>
                            <comment id="381780" author="gerrit" created="Wed, 9 Aug 2023 06:57:04 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51906&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51906&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: convert obd_conn_inprogress to atomic_t&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 61e8d23259a1a584f920fdcf7759ac74c4cbda10&lt;/p&gt;</comment>
                            <comment id="381781" author="gerrit" created="Wed, 9 Aug 2023 06:57:05 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51907&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51907&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; osd: convert od_connects to atomic_t&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 1229df8ab78f1646b6af9db91f60e8c3776fce8a&lt;/p&gt;</comment>
                            <comment id="381782" author="gerrit" created="Wed, 9 Aug 2023 06:57:06 +0000"  >&lt;p&gt;&quot;Neil Brown &amp;lt;neilb@suse.de&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/51908&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/51908&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-17022&quot; title=&quot;Clean up flags and locking in struct obd_device&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-17022&quot;&gt;LU-17022&lt;/a&gt; obdclass: rename obd_dev_lock to obd_devs_lock&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 344beb5029d661657ecfff4bc9e19f19e25886c1&lt;/p&gt;</comment>
                    </comments>
                    <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|i03slj:</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>