<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:26:00 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-2532] Link counts of osd-ldiskfs directories should be initialized via do_ref_add, rather than dio_insert</title>
                <link>https://jira.whamcloud.com/browse/LU-2532</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;One osd-ldiskfs issue not fixed in ORI-577 is that link counts of new
directories are not initialized by the reference addition and deletion
interface, but by the index insertion interface.  Callers should still
add references for &quot;.&quot; and &quot;..&quot; on new directories, but must do so
_before_ inserting the &quot;.&quot; and &quot;..&quot;.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We could possibly implement a fix like this:&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; - dio_insert and dio_delete never update link counts, not even
   for &quot;.&quot; and &quot;..&quot;.

   * Revise ldiskfs_add_dot_dotdot() to be able to add &quot;.&quot; and
     &quot;..&quot; separately, without changing link counts.  (Maybe we
     don&apos;t need a special function here; the generic
     ldiskfs_add_entry() works for &quot;.&quot; and &quot;..&quot;?)

   * Revise ldiskfs_create_inode() to initial i_fop, i_op, etc.,
     for directory inodes.  This is currently done by
     ldiskfs_add_dot_dotdot().  (We may also set i_nlink to zero
     here, as the API between LDiskFS and Lustre is being
     changed anyway.)

 - do_ref_add and do_ref_del always work as expected for
   directories.

   * A flag should be set for new directory in-memory objects,
     indicating it&apos;s not yet initialized with &quot;.&quot; and &quot;..&quot;.

   * do_ref_add clears the flag if it is set and the link count
     is going from one to two.

   * The DIR_NLINK stuff in do_ref_add and do_ref_del works only
     when the flag is absent.

   * This scheme assumes that the creation of a directory object
     and its initialization (i.e., link count, &quot;.&quot;, and &quot;..&quot;)
     happen in one transaction, which I think is quite
     reasonable.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="13886">LU-2532</key>
            <summary>Link counts of osd-ldiskfs directories should be initialized via do_ref_add, rather than dio_insert</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="bzzz">Alex Zhuravlev</assignee>
                                    <reporter username="liwei">Li Wei</reporter>
                        <labels>
                    </labels>
                <created>Thu, 5 Apr 2012 04:39:05 +0000</created>
                <updated>Thu, 16 Apr 2020 07:58:16 +0000</updated>
                            <resolved>Thu, 16 Apr 2020 07:58:16 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                            <comments>
                            <comment id="267793" author="bzzz" created="Thu, 16 Apr 2020 07:58:16 +0000"  >&lt;p&gt;fixed long ago&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|hzuwsf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2974</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>