<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:13:23 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-14858] kernfs tree to dump/traverse ldlm locks</title>
                <link>https://jira.whamcloud.com/browse/LU-14858</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It would be very useful for debugging to have a parameter tree under &lt;tt&gt;ldlm.namespaces.&amp;lt;namespace&amp;gt;.resources.&amp;#42;.&amp;#42;&lt;/tt&gt; (and also linking the &lt;tt&gt;&amp;lt;namespace&amp;gt;&lt;/tt&gt; under &lt;tt&gt;osc|mdc.&amp;#42;.ldlm.resources.&amp;#42;&lt;/tt&gt; or similar) that allowed dumping all of the LDLM lock resources, along with the current locks on each resource. Essentially there should be a &lt;tt&gt;...resources.&amp;lt;resid&amp;gt;&lt;/tt&gt; file for each resource (where &lt;tt&gt;&amp;lt;resid&amp;gt;&lt;/tt&gt; is in the form of a FID &lt;tt&gt;&amp;lt;seq&amp;gt;:&amp;lt;oid&amp;gt;:&amp;lt;ver&amp;gt;.&amp;lt;hash&amp;gt;&lt;/tt&gt;) and &quot;&lt;tt&gt;lctl list_param&lt;/tt&gt;&quot; could be used on the client or server to list all of the resources with active locks. The content of each &lt;tt&gt;.&amp;lt;resid&amp;gt;&lt;/tt&gt; file would be the list of locks on that resource (one lock per line in YAML format), and the lock parameters, like (shown wrapped for convenience, but should be printed one line per lock):&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;ldlm.namespaces.testfs-MDT0000-mdc-ffff.resources.0x200000007:0x1:0x0.0=
       - { lockh: 0x2e1ae7d1e49694a8, remote: 0x2e1ae7d1e496949a,
           type: IBT, req: PW, grant: PR, flags: 0x40210000000000,
 &#160; &#160; &#160; &#160; &#160; nid: 192.168.10.35@tcp, bits: 0x13, try_bits: 0x0 }
ldlm.namespaces.testfs-OST0000-osc-ffff.resources.0x10001000:0x2:0x0.0=
       - { lockh; 0x2e1ae84397894a4, remote: 0x2e1ae7d17364748c,
           type: EXT, req: PW, grant: PW, flags: 0x40210000014000,
 &#160; &#160; &#160; &#160; &#160;&#160;nid: 192.168.10.36@tcp, start: 0, end: 1048575, gid: 0 }
       - { lockh; 0x2e1ae84397794b4, remote: 0x2e1ae7d173688430,
           type: EXT, req: PW, grant: PW, flags: 0x40210000014000,
 &#160; &#160; &#160; &#160; &#160;&#160;nid: 192.168.10.36@tcp, start: 10485760, end: 11534335, gid: 0 }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The output should have common fields at the start, and type-specific fields at the end, to simplify parsing by scripts (eg.&lt;tt&gt;awk&lt;/tt&gt; can find fields by position).&lt;/p&gt;

&lt;p&gt;It would be useful to show both granted and blocked locks for each resource, so it is possible to see how much contention there is on each resource. &lt;/p&gt;

&lt;p&gt;This would also be useful on the MDS for dumping all of the flock locks in the system for debugging/monitoring.&lt;/p&gt;

&lt;p&gt;Writing &quot;&lt;tt&gt;clear&lt;/tt&gt;&quot; or &quot;&lt;tt&gt;0&lt;/tt&gt;&quot; into one of the &lt;tt&gt;.&amp;lt;resid&amp;gt;&lt;/tt&gt; files would either cancel all locks on the resource (if on the client and no references are held), or send a blocking callback to clients locking that resource (if on the server). We might refine this to allow cancelling a specific &lt;tt&gt;local&lt;/tt&gt; or &lt;tt&gt;remote&lt;/tt&gt; lock handle on that resource by writing the specific local or peer &lt;tt&gt;&amp;lt;lockh&amp;gt;&lt;/tt&gt; into &lt;tt&gt;.&amp;lt;resid&amp;gt;&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="65257">LU-14858</key>
            <summary>kernfs tree to dump/traverse ldlm locks</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="wc-triage">WC Triage</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>ldlm</label>
                    </labels>
                <created>Fri, 16 Jul 2021 21:47:20 +0000</created>
                <updated>Sun, 4 Feb 2024 07:45:33 +0000</updated>
                                                                                <due></due>
                            <votes>2</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="307601" author="adilger" created="Fri, 16 Jul 2021 21:53:51 +0000"  >&lt;p&gt;It would also be useful to expose the &lt;tt&gt;last_activity&lt;/tt&gt; timestamp for each lock line, and add a new &lt;tt&gt;activity_count:&lt;/tt&gt; counter (for the whole resource) that shows the number of times that resource was referenced since it was created (e.g. via new locks and lock prolong operations).  That would allow debugging how active a particular object is on the client or server, which is currently quite difficult to do without dumping verbose logs and processing them.&lt;/p&gt;</comment>
                            <comment id="402534" author="JIRAUSER17403" created="Sun, 4 Feb 2024 07:45:33 +0000"  >&lt;p&gt;Hi Andreas&lt;br/&gt;
would be great having this option for our customers&lt;br/&gt;
thanks&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="29728">LU-6529</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="65258">LU-14859</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="73538">LU-16375</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|i01zhj:</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>