<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:25:18 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-2449] ZFS osd to fix . and .. handling</title>
                <link>https://jira.whamcloud.com/browse/LU-2449</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;tags 2.3.56 and 2.3.57 builds are broken with:&lt;br/&gt;
/home/green/git/lustre-release/lustre/osd-zfs/osd_index.c:540:2: error: #warning &quot;fix &apos;.&apos; and &apos;..&apos; handling&quot;&lt;/p&gt;

&lt;p&gt;This must be addressed before the next tag&lt;/p&gt;</description>
                <environment></environment>
        <key id="16879">LU-2449</key>
            <summary>ZFS osd to fix . and .. handling</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="green">Oleg Drokin</reporter>
                        <labels>
                            <label>zfs</label>
                    </labels>
                <created>Sat, 8 Dec 2012 22:27:15 +0000</created>
                <updated>Wed, 26 Jan 2022 23:35:08 +0000</updated>
                            <resolved>Thu, 14 Mar 2013 00:53:03 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.4.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="48957" author="pjones" created="Mon, 10 Dec 2012 01:18:06 +0000"  >&lt;p&gt;Bobijam&lt;/p&gt;

&lt;p&gt;Could you please look into this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="49146" author="liwei" created="Wed, 12 Dec 2012 13:53:23 +0000"  >&lt;p&gt;Added Alex and Andreas to the watcher list.&lt;/p&gt;</comment>
                            <comment id="49296" author="bzzz" created="Mon, 17 Dec 2012 05:03:54 +0000"  >&lt;p&gt;here is a short description of the problem: ZFS does not store &quot;.&quot; and &quot;..&quot; on a disk, instead it stores parent dnode in znode and generate dots in zfs_readdir():&lt;/p&gt;

&lt;p&gt;	while (!done) {&lt;br/&gt;
		uint64_t objnum;&lt;br/&gt;
		/*&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Special case `.&apos;, `..&apos;, and `.zfs&apos;.&lt;br/&gt;
		 */&lt;br/&gt;
		if (*pos == 0) 
{
			(void) strcpy(zap.za_name, &quot;.&quot;);
			zap.za_normalization_conflict = 0;
			objnum = zp-&amp;gt;z_id;
		}
&lt;p&gt; else if (*pos == 1) &lt;/p&gt;
{
			(void) strcpy(zap.za_name, &quot;..&quot;);
			zap.za_normalization_conflict = 0;
			objnum = parent;
		}
&lt;p&gt; else if (*pos == 2 &amp;amp;&amp;amp; zfs_show_ctldir(zp)) {&lt;br/&gt;
			(void) strcpy(zap.za_name, ZFS_CTLDIR_NAME);&lt;br/&gt;
			zap.za_normalization_conflict = 0;&lt;br/&gt;
			objnum = ZFSCTL_INO_ROOT;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;to comply with ZFS on-disk format we should:&lt;br/&gt;
1) initialize parent dnode attribute upon insert(&quot;..&quot;)&lt;br/&gt;
2) do nothing upon insert(&quot;.&quot;)&lt;br/&gt;
3) implement logic similar to zfs_readdir() in iterator methods: osd_zap_it_get(), osd_zap_it_key(), etc&lt;/p&gt;</comment>
                            <comment id="49297" author="bzzz" created="Mon, 17 Dec 2012 05:13:57 +0000"  >&lt;p&gt;one issue is that parent SA can store upto 8 bytes:&lt;/p&gt;

&lt;p&gt;	SA_ADD_BULK_ATTR(bulk, cnt, SA_ZPL_PARENT(uos), NULL, &amp;amp;parent, 8);&lt;/p&gt;

&lt;p&gt;making it impossible to put dnode and fid in. there are two options here:&lt;br/&gt;
1) fetch parent dnode, then fetch LMA from that parent dnode &amp;#8211; might be expensive, but usually should be cached&lt;br/&gt;
2) store parent fid as an extra EA&lt;/p&gt;

&lt;p&gt;also, remember insert(&quot;..&quot;) can be called few times (in different transactions) as a result of rename.&lt;/p&gt;</comment>
                            <comment id="49309" author="adilger" created="Mon, 17 Dec 2012 10:24:43 +0000"  >&lt;p&gt;We already store the parent FID in the linkEA on the object. That allows finding the FID of &quot;..&quot; without searching. FID of &quot;.&quot; can be generated from LMA. &lt;/p&gt;</comment>
                            <comment id="49311" author="bzzz" created="Mon, 17 Dec 2012 11:18:53 +0000"  >&lt;p&gt;LinkEA is being manipulated by MDD and it&apos;s not considered as mandatory, AFAIU. for example, we ignore errors related to LinkEA.&lt;/p&gt;</comment>
                            <comment id="49319" author="adilger" created="Mon, 17 Dec 2012 13:11:53 +0000"  >&lt;p&gt;We only ignore such errors when there are many links on a regular file.  There should always be enough space for a single linkEA on a directory to point to the parent.  All ZFS filesystems are 2.x, so they should also have linkEA entries already, unlike upgraded 1.8 filesystems.&lt;/p&gt;

&lt;p&gt;I agree MDD creating linkEA might be a bit bothersome, but it is only being read by the OSD code, never modified.  If it isn&apos;t available, it is always possible to do OI lookup for parent dnode number to find FID?&lt;/p&gt;</comment>
                            <comment id="49320" author="bzzz" created="Mon, 17 Dec 2012 13:14:55 +0000"  >&lt;p&gt;yes, of course. a minor correction: should be possible to load LMA of specific dnode to find its FID.&lt;/p&gt;
</comment>
                            <comment id="50275" author="bzzz" created="Thu, 10 Jan 2013 13:14:18 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/4990&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/4990&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;not the final version though.. some compatibility with the existing setup is required.&lt;/p&gt;</comment>
                            <comment id="50365" author="bzzz" created="Fri, 11 Jan 2013 15:21:11 +0000"  >&lt;p&gt;the patch has been updated with the compatibility and additional infrastructure to simulate old setup (where ./.. are stored on a disk).&lt;/p&gt;</comment>
                            <comment id="50378" author="bzzz" created="Sat, 12 Jan 2013 01:26:51 +0000"  >&lt;p&gt;hmm, this patch provides forward compatibility, but not backward: it does remove ./.. if they are stored on a disk,&lt;br/&gt;
but do not add new one (they are generated on demand like ZPL does). with the current master code that will result&lt;br/&gt;
in non-existing ./.. and number of consequences.&lt;/p&gt;

&lt;p&gt;Christopher, what would be your opinion on this? would you be OK to switch to a new tag and do not go back?&lt;/p&gt;</comment>
                            <comment id="50379" author="adilger" created="Sat, 12 Jan 2013 01:33:20 +0000"  >&lt;p&gt;Alex, I think this is the reasonable path forward.  The only other option is to start filling in and using the &quot;zp_parent&quot; field, but not delete the &quot;.&quot; and &quot;..&quot; entries yet, and that can be done in a separate patch.  That would allow migrating to the new code, and only disabling storing of &quot;.&quot; and &quot;..&quot; once the first patch is known to be working.&lt;/p&gt;</comment>
                            <comment id="50434" author="adilger" created="Mon, 14 Jan 2013 15:11:59 +0000"  >&lt;p&gt;To comment further - I don&apos;t think it is necessary to make the extra effort to remove the &quot;.&quot; and &quot;..&quot; entries from the on-disk ZAPs, so long as they are filtered out at the readdir level.  The legacy filesystems/directories holding &quot;.&quot; and &quot;..&quot; will disappear eventually.&lt;/p&gt;</comment>
                            <comment id="50466" author="bzzz" created="Mon, 14 Jan 2013 23:20:36 +0000"  >&lt;p&gt;not that I&apos;m against this &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; just got to think  a potential ZPL user can be confused finding two ./.. &lt;/p&gt;</comment>
                            <comment id="50494" author="morrone" created="Tue, 15 Jan 2013 13:54:23 +0000"  >&lt;p&gt;If thats the worst that we&apos;ll see (two sets of . or ..), then I think that is reasonable, and we don&apos;t need to jump through hoops to eliminate it.  A tool external to lustre to clean it up might be nice.  The Sequoia filesystem could live for another 5 years.&lt;/p&gt;</comment>
                            <comment id="51354" author="adilger" created="Mon, 28 Jan 2013 14:52:00 +0000"  >&lt;p&gt;Brian, any chance you will have time to inspect the patch in &lt;a href=&quot;http://review.whamcloud.com/4990?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/4990?&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="51876" author="jlevi" created="Wed, 6 Feb 2013 12:48:51 +0000"  >&lt;p&gt;Brian, would you have time to inspect this patch this week? Thank you!&lt;/p&gt;</comment>
                            <comment id="52047" author="pjones" created="Fri, 8 Feb 2013 13:27:07 +0000"  >&lt;p&gt;Landed for 2.4&lt;/p&gt;</comment>
                            <comment id="52048" author="adilger" created="Fri, 8 Feb 2013 13:28:45 +0000"  >&lt;p&gt;Still a few fixes for this.&lt;/p&gt;</comment>
                            <comment id="52699" author="adilger" created="Tue, 19 Feb 2013 13:47:33 +0000"  >&lt;p&gt;Still &lt;a href=&quot;http://review.whamcloud.com/5413&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5413&lt;/a&gt; to land.&lt;/p&gt;</comment>
                            <comment id="53140" author="pjones" created="Wed, 27 Feb 2013 20:34:33 +0000"  >&lt;p&gt;Landed for 2.4&lt;/p&gt;</comment>
                            <comment id="53522" author="bzzz" created="Thu, 7 Mar 2013 06:17:43 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/5629&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5629&lt;/a&gt; &amp;#8211; this patch implements fallback path for lookup(..) when LinkEA is not available.&lt;/p&gt;

&lt;p&gt;the only remaining bit to close the ticket is to update parent dnode for regular files on object creation.&lt;/p&gt;</comment>
                            <comment id="53551" author="bzzz" created="Thu, 7 Mar 2013 14:16:17 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/#change,5642&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,5642&lt;/a&gt; &amp;#8211; with this patch all the objects should be getting parent dnode attribute initialized properly.&lt;/p&gt;</comment>
                            <comment id="53972" author="pjones" created="Thu, 14 Mar 2013 00:53:03 +0000"  >&lt;p&gt;Landed for 2.4&lt;/p&gt;</comment>
                            <comment id="54102" author="jlevi" created="Fri, 15 Mar 2013 08:33:35 +0000"  >&lt;p&gt;Lowering priority now that first patch has landed.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="13804">LU-2231</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="17735">LU-2890</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|hzvdgn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5787</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>