<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:11:34 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-908] multi-block xattr support</title>
                <link>https://jira.whamcloud.com/browse/LU-908</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The existing large xattr patch for ext4 in &lt;a href=&quot;http://review.whamcloud.com/1708&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/1708&lt;/a&gt; saves the xattr value in an external inode if the size of the value is larger than the blocksize. This would introduce performance degradation for operating large xattrs due to the need to create an extra inode for any xattr over 4kB. To improve the performance, we would implement &quot;mid-sized&quot; xattrs (up to 64kB) by referencing them directly from the xattr block pointer. This was requested by the upstream ext4 maintainer before accepting the large xattr patches into mainline Linux.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12641">LU-908</key>
            <summary>multi-block xattr support</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="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="4">Incomplete</resolution>
                                        <assignee username="yujian">Jian Yu</assignee>
                                    <reporter username="yujian">Jian Yu</reporter>
                        <labels>
                    </labels>
                <created>Sun, 11 Dec 2011 21:02:22 +0000</created>
                <updated>Wed, 11 Apr 2018 05:52:45 +0000</updated>
                            <resolved>Wed, 11 Apr 2018 05:52:45 +0000</resolved>
                                    <version>Lustre 2.2.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="24070" author="yujian" created="Sun, 11 Dec 2011 21:20:26 +0000"  >&lt;p&gt;There are some comments and discussions for this feature in &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-80&quot; title=&quot;Wide striping support&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-80&quot;&gt;&lt;del&gt;LU-80&lt;/del&gt;&lt;/a&gt;. Here are some important ones:&lt;/p&gt;

&lt;p&gt;Comment from Yu Jian on 09/Nov/11:&lt;br/&gt;
-------------------------------------------------&lt;br/&gt;
Comments and instructions from Andreas:&lt;/p&gt;

&lt;p&gt;As per &lt;a href=&quot;https://bugzilla.lustre.org/show_bug.cgi?id=4424#c112&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;bug 4424 comment #112&lt;/a&gt; and &lt;a href=&quot;https://bugzilla.lustre.org/show_bug.cgi?id=4424#c272&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;comment #272&lt;/a&gt;, the following improvements need to be made on the existing large EA patch for ext4 and e2fsprogs so as to get the patch and changes accepted and included into the upstream kernel ext4 and e2fsprogs:&lt;/p&gt;

&lt;p&gt;1) EA value will be stored in an external inode if value_size &amp;gt; blocksize instead of 1/2 blocksize.&lt;br/&gt;
There is no point to move the EA value to an external inode if it would fit into the xattr block. This is doubly true with the next change, to allow multiple blocks for xattrs without having to resort to a separate inode.&lt;/p&gt;

&lt;p&gt;2) Increase EA space by allocating a single chunk of up to 64kB/blocksize contiguous xattr blocks and storing the block count in ext4_xattr_header-&amp;gt;h_blocks.&lt;br/&gt;
To decide how many blocks to be allocated at once, Andreas suggested to just allocate the required number of xattr blocks, and in the rare case where we need to increase the xattr space we can try to reallocate, or simply fail with ENOSPC. This is no worse than the current code if it runs out of space with the single xattr block.&lt;/p&gt;

&lt;p&gt;The change to the xattr blocks should be completely transparent to Lustre. ldiskfs can still continue to advertise the maximum xattr size larger than the 64kB which will fit into the external block range, but for most of our uses we will not need more than 64kB. Even the wide striping patch will currently only need 32kB for the 1350-stripe limit. Avoiding the use of the external inode will likely improve performance significantly.&lt;/p&gt;

&lt;p&gt;As for testing, the normal way to handle this is to add support to ext4 and create a small test filesystem with a multi-block xattr by mounting it with ext4/ldiskfs (nojournal to save space) and using setfattr with a large xattr, use getfattr to verify it works.&lt;/p&gt;

&lt;p&gt;3) Then, add support to e2fsprogs and e2fsck in order to check that the multi-block xattr is correct, and then save the image to the e2fsprogs (something like tests/f_xattr_blocks/image.gz) subdirectory and running the e2fsprogs e2fsck test script on it.&lt;/p&gt;

&lt;p&gt;The e2fsprogs &quot;f_xattrs_blocks&quot; image should include several different inodes:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;xattr blocks with size nearly 64kB (- xattr headers, should pass)&lt;/li&gt;
	&lt;li&gt;xattr blocks with multiple xattrs &amp;gt; 4kB (should pass)&lt;/li&gt;
	&lt;li&gt;xattr blocks with many small xattrs (should pass)&lt;/li&gt;
	&lt;li&gt;xattr blocks that points to completely incorrect block (no header/magic)&lt;br/&gt;
  (should clear xattr block from inode)&lt;/li&gt;
	&lt;li&gt;xattr blocks not set in bitmap (should validate xattr, set blocks in bitmap)&lt;/li&gt;
	&lt;li&gt;xattr blocks that points to correct block number, some blocks shared with file&lt;br/&gt;
  (should invoke duplicate block pass 1b to clone blocks)&lt;/li&gt;
	&lt;li&gt;xattr block overlapping with inode table (should clone in pass 1b)&lt;/li&gt;
	&lt;li&gt;any other failure cases you can think of&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;There is already a test case for the external xattr inode, that should stay.&lt;/p&gt;


&lt;p&gt;Comment from Yu Jian on 21/Nov/11:&lt;br/&gt;
-------------------------------------------------&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;It would be possible to handle this in the code by handling xattr values that span multiple buffers, which is ignored in the common case because the buffer size should be &amp;lt;= blocksize. However, I don&apos;t know how complex this would be. It might also be worthwhile to ask on the ext4 list if anyone has a good idea of how to solve this. I hope their solution is not to require limiting the single xattr size to 4kB or less...&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Threads on the linux-ext4 list:&lt;br/&gt;
&lt;a href=&quot;http://www.spinics.net/lists/linux-ext4/msg29059.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.spinics.net/lists/linux-ext4/msg29059.html&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://www.spinics.net/lists/linux-ext4/msg29061.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.spinics.net/lists/linux-ext4/msg29061.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solution is to support handling xattr data among non-contiguous block buffers. &lt;/p&gt;</comment>
                            <comment id="131198" author="adilger" created="Thu, 22 Oct 2015 16:55:13 +0000"  >&lt;p&gt;Note: limiting the individual xattr size to &amp;lt; 4KB would make this enhancement totally useless for Lustre, so that is not an acceptable solution for us. &lt;/p&gt;</comment>
                            <comment id="149192" author="adilger" created="Sun, 17 Apr 2016 09:22:37 +0000"  >&lt;p&gt;Note: the xattr_inode feature has been around long enough in Listre that adding multi-block 64KB xattrs will likely need new feature flag. &lt;/p&gt;</comment>
                            <comment id="208570" author="adilger" created="Sat, 16 Sep 2017 08:38:42 +0000"  >&lt;p&gt;The &lt;tt&gt;xattr_inode&lt;/tt&gt; feature has been included upstream in e2fsprogs-1.44 and kernel 4.14.&lt;/p&gt;

&lt;p&gt;That said, there are a few changes to the on-disk format (made in a forward compatible way) that should be included into our patches, so that filesystems are maximally compatible when we start using those newer kernels.&lt;/p&gt;</comment>
                            <comment id="225705" author="adilger" created="Wed, 11 Apr 2018 05:52:45 +0000"  >&lt;p&gt;The &lt;tt&gt;ea_inode&lt;/tt&gt; feature is now available in e2fsprogs-1.44 and later.  The on-disk format is largely the same as the feature implemented for Lustre, and there are compatibility hooks in the ext4 and e2fsprogs code to handle files using the Lustre-formatted xattr inode.&lt;/p&gt;

&lt;p&gt;As such, there is currently not much need for this enhancement to be implemented.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="10358">LU-80</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="46931">LU-9724</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="15458">LU-1732</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="28587">LU-6220</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|hzw19r:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10287</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>