<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:28:39 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-9723] test large xattr (ea_inode) patch interoperability</title>
                <link>https://jira.whamcloud.com/browse/LU-9723</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The large xattr (&lt;tt&gt;ea_inode&lt;/tt&gt;) feature patches are being merged into the upstream 4.13 kernel, but additional changes are being built on top of the EA inode functionality that we use in the ldiskfs patch series.  In particular, in the upstream patch series the EA inodes can be shared among multiple parent inodes, and instead of having a backpointer to the parent inode/generation the shared inodes have a refcount and a hash of the xattr value to verify that the correct xattr is referenced.  Once we update to a newer vendor kernel that includes these changes, we can remove the patch from ldiskfs to reduce ongoing maintenance efforts, but we can&apos;t wait until that time to verify that the feature works properly with existing Lustre filesystems.&lt;/p&gt;

&lt;p&gt;There is supposed to be interoperability functionality in the upstream feature to allow access to existing Lustre EA inodes.  We need to test that the ext4 patches being landed to the upstream kernel are able to work with xattrs created by Lustre, and that the upstream e2fsprogs will not consider Lustre EA inodes to be corrupt.  This testing needs to be done in the next week or two, to ensure that we can feed back any issues to the upstream ext4 maintainers before that feature is released in an upstream kernel.&lt;/p&gt;

&lt;p&gt;For testing, something like the following process should be sufficient:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;create an MDT filesystem with an existing RHEL7 kernel with &lt;tt&gt;--mkfsoptions=&quot;-O ea_inode&quot;&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;mount filesystem as type &lt;tt&gt;lustre&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;create large &lt;tt&gt;user.test&lt;/tt&gt; xattrs via &lt;tt&gt;setfattr&lt;/tt&gt; (up to 64KiB) with verifiable data (e.g. filename repeated many times)&lt;/li&gt;
	&lt;li&gt;dump all xattrs via &lt;tt&gt;getfattr -d -m user.test testfiles &amp;gt; xattrs.lustre&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;upgrade the kernel to upstream kernel&lt;/li&gt;
	&lt;li&gt;disable the &lt;tt&gt;dirdata&lt;/tt&gt; feature via &lt;tt&gt;debugfs -w -R &quot;feature ^dirdata&quot; /dev/MDT&lt;/tt&gt; and mount it as type ext4&lt;/li&gt;
	&lt;li&gt;dump all xattrs via &lt;tt&gt;getfattr -d -m user.test testfiles &amp;gt; xattrs.ext4&lt;/tt&gt; and compare to &lt;tt&gt;xattrs.lustre&lt;/tt&gt; to verify xattr consistency and ensure that no errors are generated by the kernel&lt;/li&gt;
	&lt;li&gt;run new &lt;tt&gt;e2fsck&lt;/tt&gt; on updated filesystem to verify that it does not consider the EA inodes as corrupted, at worst it should offer to fix the refcount and hash values of those inodes&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The upstream kernel patches are included on the &lt;tt&gt;dev&lt;/tt&gt; branch of &lt;a href=&quot;https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git&lt;/a&gt; (all of the patches from author &quot;Tahsin Erdogan&quot;) but could potentially also be pushed as a series to the &lt;tt&gt;fs/linux-staging&lt;/tt&gt; branch (with &lt;tt&gt;Test-Parameters: forbuildonly&lt;/tt&gt; since there is no benefit to Lustre testing on them) in order to have Jenkins build the patches for testing via &lt;tt&gt;loadjenkinsbuild&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="46930">LU-9723</key>
            <summary>test large xattr (ea_inode) patch interoperability</summary>
                <type id="3" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11318&amp;avatarType=issuetype">Task</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="emoly.liu">Emoly Liu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Jun 2017 22:39:58 +0000</created>
                <updated>Fri, 10 Aug 2018 03:11:00 +0000</updated>
                            <resolved>Wed, 8 Aug 2018 21:03:34 +0000</resolved>
                                                                        <due>Fri, 7 Jul 2017 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="200705" author="emoly.liu" created="Fri, 30 Jun 2017 08:46:23 +0000"  >&lt;p&gt;Is there any else requirement about the testing environment, e.g. one single node is enough?&lt;/p&gt;</comment>
                            <comment id="200946" author="adilger" created="Tue, 4 Jul 2017 21:35:46 +0000"  >&lt;p&gt;One node is enough.  Unfortunately, the test configuration is complicated by the fact we don&apos;t have &lt;tt&gt;dirdata&lt;/tt&gt; support for the newer upstream kernel, nor can we mount the MDT with upstream kernel since there is no ldiskfs patch series for it.&lt;/p&gt;

&lt;p&gt;Feel free to ask questions here or via Skype if something isn&apos;t clear.  I&apos;d like to get feedback to the upstream ext4 maintainer and &lt;tt&gt;ea_xattr&lt;/tt&gt; developer within the next week or so.&lt;/p&gt;</comment>
                            <comment id="200981" author="emoly.liu" created="Wed, 5 Jul 2017 07:47:49 +0000"  >&lt;p&gt;Andreas,&lt;br/&gt;
Cloning &lt;a href=&quot;https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git&lt;/a&gt;  is extremely slow for me locally, so I did it on trevis instead. The following commits signed-off by &quot;Tahsin Erdogan&quot;, related to ext4, are all needed to apply to upstream kernel?&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;-sh-4.1$ git log --author=&quot;Tahsin Erdogan&quot; --oneline|grep ext4
6f82dfb ext4: change fast symlink test to not rely on i_blocks
ad39acd ext4: add nombcache mount option
1205d54 ext4: strong binding of xattr inode references
17bb880 ext4: eliminate xattr entry e_hash recalculation for removes
de5b47d ext4: reserve space for xattr entries/names
82fd1c9 ext4: xattr inode deduplication
30a7eb9 ext4: cleanup transaction restarts during inode deletion
02749a4 ext4: add ext4_is_quota_file()
4738740 ext2, ext4: make mb block cache names more explicit
b6d9029 ext4: move struct ext4_xattr_inode_array to xattr.h
0421a18 ext4: modify ext4_xattr_ino_array to hold struct inode *
c1a5d5f ext4: improve journal credit handling in set xattr paths
65d3000 ext4: ext4_xattr_delete_inode() should return accurate errors
b347e2b ext4: retry storing value in external inode with xattr block too
b315529 ext4: fix credits calculation for xattr inode
7cec191 ext4: fix ext4_xattr_cmp()
f610910 ext4: fix ext4_xattr_move_to_block()
9bb21ce ext4: fix ext4_xattr_make_inode_space() value size calculation
0bd454c ext4: ext4_xattr_value_same() should return false for external data
990461d ext4: add missing le32_to_cpu(e_value_inum) conversions
90966693 ext4: clean up ext4_xattr_inode_get()
bab79b0 ext4: change ext4_xattr_inode_iget() signature
0eefb10 ext4: extended attribute value size limit is enforced by vfs
1e7d359 ext4: fix ref counting for ea_inode
ddfa17e ext4: call journal revoke when freeing ea_inode blocks
9e1ba00 ext4: ea_inode owner should be the same as the inode owner
bd3b963 ext4: attach jinode after creation of xattr inode
1b917ed ext4: do not set posix acls on xattr inodes
0de5983 ext4: lock inode before calling ext4_orphan_add()
33d201e ext4: fix lockdep warning about recursive inode locking
b8cb5a5 ext4: fix quota charging for shared xattr blocks
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="201018" author="emoly.liu" created="Wed, 5 Jul 2017 14:34:25 +0000"  >&lt;p&gt;Just had a check at the latest upstream kernel cloned from git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git, it included all the ext4 patches I posted above, except the top one &quot;6f82dfb ext4: change fast symlink test to not rely on i_blocks&quot;.&lt;/p&gt;

&lt;p&gt;Next, I will compile the upstream kernel with that patch and perform the test. I will update the status later. &lt;/p&gt;</comment>
                            <comment id="201155" author="emoly.liu" created="Thu, 6 Jul 2017 12:53:30 +0000"  >&lt;p&gt;I hit some issues when upgrading to the upstream kernel. I&apos;m looking into them.&lt;/p&gt;</comment>
                            <comment id="201226" author="adilger" created="Thu, 6 Jul 2017 18:54:55 +0000"  >&lt;p&gt;Hi Emoly, thank you for your testing.  It looks like the upstream kernel &lt;tt&gt;ea_inode&lt;/tt&gt; feature works properly to access the Lustre xattrs, which is great.&lt;/p&gt;

&lt;p&gt;Could you please check if there are any error messages on the console when accessing the large xattr on the upstream kernel.  Could you also run the &lt;b&gt;upstream&lt;/b&gt; e2fsprogs with the &lt;tt&gt;ea_inode&lt;/tt&gt; feature against the MDT filesystem (possibly after the Lustre e2fsprogs runs to clean up &lt;tt&gt;dirdata&lt;/tt&gt; errors) to see that the new e2fsprogs works properly with existing large xattrs.&lt;/p&gt;</comment>
                            <comment id="201294" author="emoly.liu" created="Fri, 7 Jul 2017 04:36:34 +0000"  >&lt;p&gt;Andreas, sorry, the test I did yesterday was not correct. Here are the new steps and results:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;env:
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;lustre: top commit &quot;f7df236 &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9183&quot; title=&quot;Support for linux 4.9 kernels&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9183&quot;&gt;&lt;del&gt;LU-9183&lt;/del&gt;&lt;/a&gt;&quot;&lt;/li&gt;
		&lt;li&gt;lustre kernel: 3.10.0-514.16.1.el7_lustre.x86_64&lt;/li&gt;
		&lt;li&gt;upstream kernel: top commit &quot;0c5f031 Add linux-next specific files for 20170705&quot; applied with ext4 patch &quot;6f82dfb ext4: change fast symlink test to not rely on i_blocks&quot;; compiled version &quot;4.12.0-lu9723-next-20170705+&quot;&lt;/li&gt;
		&lt;li&gt;e2fsprogs: 1.42.13.wc6-7.el7.x86_64&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;steps:
&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;# mkfs.lustre --mgs --fsname=lustre --mdt --index=0 --param=sys.timeout=20 --param=lov.stripesize=1048576 --param=lov.stripecount=0 --param=mdt.identity_upcall=/root/lustre-release/lustre/tests/../utils/l_getidentity --backfstype=ldiskfs --device-size=200000 --mkfsoptions=&quot;-O ea_inode&quot; --reformat /tmp/lustre-mdt1
# mkfs.lustre --mgsnode=centos7-4@tcp --fsname=lustre --ost --index=0 --param=sys.timeout=20 --backfstype=ldiskfs --device-size=400000 --reformat /tmp/lustre-ost1
# mount -t lustre   -o loop /tmp/lustre-mdt1 /mnt/lustre-mds1
# mount -t lustre   -o loop /tmp/lustre-ost1 /mnt/lustre-ost1
# mount -t lustre -o user_xattr,flock centos7-4@tcp:/lustre /mnt/lustre
# touch /mnt/lustre/testfile
# setfattr -n user.test -v $(for i in `seq 1 2048`; do echo -n &quot;abcdefghijklmnopqrstuvwxyz123456&quot;;done) /mnt/lustre/testfile
# getfattr -d -m user.test /mnt/lustre/testfile &amp;gt; xattrs.lustre

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then upgrade to the upstream kernel&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;# debugfs -w -R &apos;feature ^dirdata&apos; /tmp/lustre-mdt1
debugfs 1.42.13.wc6 (05-Feb-2017)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype flex_bg ea_inode sparse_super large_file huge_file uninit_bg dir_nlink quota
# mount -t ext4 /tmp/lustre-mdt1 /mnt/lustre-mds1
# getfattr -d -m user.test /mnt/lustre-mds1/ROOT/testfile 2&amp;gt;&amp;amp;1 | tee xattrs.ext4
/mnt/lustre-mds1/ROOT/testfile: user.test: Structure needs cleaning
# umount /mnt/lustre-mds1
# e2fsck -d -v -t -t -f -y /tmp/lustre-mdt1 2&amp;gt;&amp;amp;1 | tee e2fsck.log
e2fsck 1.42.13.wc6 (05-Feb-2017)
Pass 1: Checking inodes, blocks, and sizes
Pass 1: Memory used: 264k/0k (83k/182k), time:  0.00/ 0.00/ 0.00
Pass 1: I/O read: 1MB, write: 1MB, rate: 492.85MB/s
Pass 2: Checking directory structure
Entry &apos;[0x200000400:0x1:0x0]&apos; in /update_log_dir (53375) dirdata length set incorrectly.
Clear? yes

Entry &apos;.lustre&apos; in /ROOT (53376) dirdata length set incorrectly.
Clear? yes

Entry &apos;testfile&apos; in /ROOT (53376) dirdata length set incorrectly.
Clear? yes

Entry &apos;..&apos; in /ROOT/.lustre (53377) dirdata length set incorrectly.
Clear? yes

Entry &apos;fid&apos; in /ROOT/.lustre (53377) dirdata length set incorrectly.
Clear? yes

Entry &apos;lost+found&apos; in /ROOT/.lustre (53377) dirdata length set incorrectly.
Clear? yes

Entry &apos;..&apos; in /ROOT/.lustre/fid (53378) dirdata length set incorrectly.
Clear? yes

Entry &apos;..&apos; in /ROOT/.lustre/lost+found (53379) dirdata length set incorrectly.
Clear? yes

Pass 2: Memory used: 264k/0k (91k/174k), time:  0.00/ 0.00/ 0.00
Pass 2: I/O read: 1MB, write: 1MB, rate: 229.78MB/s
Pass 3: Checking directory connectivity
Peak memory: Memory used: 264k/0k (91k/174k), time:  0.01/ 0.00/ 0.00
Pass 3A: Memory used: 264k/0k (91k/174k), time:  0.00/ 0.00/ 0.00
Pass 3A: I/O read: 0MB, write: 0MB, rate: 0.00MB/s
Pass 3: Memory used: 264k/0k (89k/176k), time:  0.00/ 0.00/ 0.00
Pass 3: I/O read: 1MB, write: 0MB, rate: 9803.92MB/s
Pass 4: Checking reference counts
Pass 4: Memory used: 264k/0k (61k/204k), time:  0.00/ 0.00/ 0.00
Pass 4: I/O read: 1MB, write: 0MB, rate: 512.56MB/s
Pass 5: Checking group summary information
Pass 5: Memory used: 264k/0k (60k/205k), time:  0.00/ 0.00/ 0.00
Pass 5: I/O read: 1MB, write: 0MB, rate: 396.04MB/s

lustre-MDT0000: ***** FILE SYSTEM WAS MODIFIED *****

         265 inodes used (0.33%, out of 79992)
           3 non-contiguous files (1.1%)
           0 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 1/0/0
       24543 blocks used (49.09%, out of 50000)
           0 bad blocks
           1 large file

         140 regular files
         116 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
           0 symbolic links (0 fast symbolic links)
           0 sockets
------------
         255 files
Memory used: 264k/0k (60k/205k), time:  0.02/ 0.01/ 0.00
I/O read: 1MB, write: 1MB, rate: 60.79MB/s

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We can see getfattr report error &quot;&lt;font color=&quot;#ff0000&quot;&gt;Structure needs cleaning&lt;/font&gt;&quot; on upstream kernel. When I ran &quot;strace getfattr xxx&quot;, it showed the following logs:&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;getxattr(&quot;/mnt/lustre-mds1/ROOT/testfile&quot;, &quot;user.test&quot;, 0x0, 0) = 65536
getxattr(&quot;/mnt/lustre-mds1/ROOT/testfile&quot;, &quot;user.test&quot;, 0x1685b20, 65536) = -1 EUCLEAN (Structure needs cleaning)
write(2, &quot;/mnt/lustre-mds1/ROOT/testfile: &quot;, 32/mnt/lustre-mds1/ROOT/testfile: ) = 32

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I will upload xattr.*, e2fsck.log and strace.log later.&lt;/p&gt;</comment>
                            <comment id="201308" author="adilger" created="Fri, 7 Jul 2017 06:27:19 +0000"  >&lt;p&gt;Please check if there are any console messages from ext4 when trying to access the large xattr on the new kernel. This will help debug where the error is coming from. &lt;/p&gt;

&lt;p&gt;Could you please also run the upstream e2fsck from &lt;a href=&quot;https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git&lt;/a&gt; &quot;next&quot; branch against the MDT filesystem &lt;b&gt;after&lt;/b&gt; the Lustre e2fsck 1.42.13.wc5 is run to clean up the &lt;tt&gt;dirdata&lt;/tt&gt; errors. That should be possible on the current filesystem if it is still available, but it may prevent debugging the -EUCLEAN error further.&lt;/p&gt;

&lt;p&gt;It would also be good to check if it is possible to mount the filesystem back as type Lustre on the old kernel after the new e2fsck is run, since this should keep the existing large xattrs as-is so that we can still mount use the old ldiskfs &lt;tt&gt;ea_inode&lt;/tt&gt; code. &lt;/p&gt;</comment>
                            <comment id="201312" author="emoly.liu" created="Fri, 7 Jul 2017 06:46:54 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Please check if there are any console messages from ext4 when trying to access the large xattr on the new kernel. This will help debug where the error is coming from.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I didn&apos;t see more messages on the new kernel console and didn&apos;t see other&#160;useful messages in the system log.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Could you please also run the upstream e2fsck from&#160;&lt;a href=&quot;https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git&lt;/a&gt;&quot;next&quot; branch against the MDT filesystem&#160;&lt;b&gt;after&lt;/b&gt;&#160;the Lustre e2fsck 1.42.13.wc5 is run to clean up the&#160;&lt;tt&gt;dirdata&lt;/tt&gt;&#160;errors. That should be possible on the current filesystem if it is still available, but it may prevent debugging the -EUCLEAN error further.&lt;/p&gt;

&lt;p&gt;It would also be good to check if it is possible to mount the filesystem back as type Lustre on the old kernel after the new e2fsck is run, since this should keep the existing large xattrs as-is so that we can still mount use the old ldiskfs&#160;&lt;tt&gt;ea_inode&lt;/tt&gt;&#160;code.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;OK, I will download that upstream e2fsck and do these tests.&lt;/p&gt;</comment>
                            <comment id="201331" author="emoly.liu" created="Fri, 7 Jul 2017 10:54:07 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Could you please also run the upstream e2fsck from&#160;&lt;a href=&quot;https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git&lt;/a&gt;&quot;next&quot; branch against the MDT filesystem&#160;&lt;b&gt;after&lt;/b&gt;&#160;the Lustre e2fsck 1.42.13.wc5 is run to clean up the&#160;&lt;tt&gt;dirdata&lt;/tt&gt;&#160;errors. That should be possible on the current filesystem if it is still available, but it may prevent debugging the -EUCLEAN error further.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Here is the output of running the new e2fsck on the MDT device&#160;&lt;b&gt;after&lt;/b&gt;&#160;the Lustre e2fsck 1.42.13.wc5 is run to clean up the&#160;&lt;tt&gt;dirdata&lt;/tt&gt;&#160;errors.&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;[root@centos7-4 e2fsck]# ./e2fsck -d -v -t -t -f -y /tmp/lustre-mdt1 2&amp;gt;&amp;amp;1 | tee e2fsck_new.log
e2fsck 1.43.5-WIP (17-Feb-2017)
Pass 1: Checking inodes, blocks, and sizes
Pass 1: Memory used: 272k/0k (94k/179k), time:  0.00/ 0.00/ 0.00
Pass 1: I/O read: 1MB, write: 1MB, rate: 521.10MB/s
Pass 2: Checking directory structure
Entry &apos;..&apos; in /ROOT/.lustre/fid (53378) has an incorrect filetype (was 18, should be 2).
Fix? yes

Entry &apos;..&apos; in /ROOT/.lustre/lost+found (53379) has an incorrect filetype (was 18, should be 2).
Fix? yes

Pass 2: Memory used: 272k/0k (102k/171k), time:  0.00/ 0.00/ 0.00
Pass 2: I/O read: 1MB, write: 1MB, rate: 660.07MB/s
Pass 3: Checking directory connectivity
Peak memory: Memory used: 272k/0k (103k/170k), time:  0.01/ 0.00/ 0.00
Pass 3A: Memory used: 272k/0k (103k/170k), time:  0.00/ 0.00/ 0.00
Pass 3A: I/O read: 0MB, write: 0MB, rate: 0.00MB/s
Pass 3: Memory used: 272k/0k (101k/172k), time:  0.00/ 0.00/ 0.00
Pass 3: I/O read: 1MB, write: 0MB, rate: 6211.18MB/s
Pass 4: Checking reference counts
Pass 4: Memory used: 272k/0k (65k/208k), time:  0.00/ 0.00/ 0.00
Pass 4: I/O read: 1MB, write: 0MB, rate: 554.32MB/s
Pass 5: Checking group summary information
Pass 5: Memory used: 272k/0k (64k/209k), time:  0.00/ 0.00/ 0.00
Pass 5: I/O read: 1MB, write: 0MB, rate: 547.65MB/s

lustre-MDT0000: ***** FILE SYSTEM WAS MODIFIED *****

         265 inodes used (0.33%, out of 79992)
           3 non-contiguous files (1.1%)
           0 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 1/0/0
       24543 blocks used (49.09%, out of 50000)
           0 bad blocks
           1 large file

         140 regular files
         116 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
           0 symbolic links (0 fast symbolic links)
           0 sockets
------------
         255 files
Memory used: 272k/0k (63k/210k), time:  0.03/ 0.01/ 0.00
I/O read: 2MB, write: 1MB, rate: 74.95MB/s

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I will upload the result in file e2fsck_new.log.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It would also be good to check if it is possible to mount the filesystem back as type Lustre on the old kernel after the new e2fsck is run, since this should keep the existing large xattrs as-is so that we can still mount use the old ldiskfs&#160;&lt;tt&gt;ea_inode&lt;/tt&gt;&#160;code.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The answer is yes. I can&#160;mount the filesystem back as type Lustre on the old kernel after the new e2fsck is run. Here is the output:&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;[root@centos7-4 tests]# mount -t lustre   -o loop /tmp/lustre-mdt1 /mnt/lustre-mds1
[root@centos7-4 tests]# mount -t lustre   -o loop /tmp/lustre-ost1 /mnt/lustre-ost1
[root@centos7-4 tests]# mount -t lustre -o user_xattr,flock centos7-4@tcp:/lustre /mnt/lustre
[root@centos7-4 tests]# ls -al /mnt/lustre/testfile 
-rw-r--r--. 1 root root 0 Jul  7 12:28 /mnt/lustre/testfile
[root@centos7-4 tests]# getfattr -d -m user.test /mnt/lustre/testfile | tee xattrs_after_new_e2fs.lustre
getfattr: Removing leading &apos;/&apos; from absolute path names
# file: mnt/lustre/testfile
user.test=&quot;abcdefghijklmnopqrstuvwxyz123456abcdefghijk...

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I will upload file xattrs_after_new_e2fs.lustre later too.&lt;/p&gt;

&lt;p&gt;Next, as we discussed, I will add some printk() lines to the places where -EFSCORRUPTED is returned so that we can see why it thinks the xattr is bad.&lt;/p&gt;</comment>
                            <comment id="201473" author="emoly.liu" created="Mon, 10 Jul 2017 03:57:27 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt; and &lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=bzzz&quot; class=&quot;user-hover&quot; rel=&quot;bzzz&quot;&gt;bzzz&lt;/a&gt;, the debugging information shows the error &quot; -EFSCORRUPTED&quot; is returned from the following code in fs/ext4/xattr.c: ext4_xattr_inode_verify_hashes()&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;static int
ext4_xattr_inode_verify_hashes(struct inode *ea_inode,
                               struct ext4_xattr_entry *entry, void *buffer,
                               size_t size)
{
        u32 hash;

        /* Verify stored hash matches calculated hash. */
        hash = ext4_xattr_inode_hash(EXT4_SB(ea_inode-&amp;gt;i_sb), buffer, size);
        if (hash != ext4_xattr_inode_get_hash(ea_inode))
                return -EFSCORRUPTED;   //return error in this line

        if (entry) {
                __le32 e_hash, tmp_data;

                /* Verify entry hash. */
                tmp_data = cpu_to_le32(hash);
                e_hash = ext4_xattr_hash_entry(entry-&amp;gt;e_name, entry-&amp;gt;e_name_len,
                                               &amp;amp;tmp_data, 1);
                if (e_hash != entry-&amp;gt;e_hash)
                        return -EFSCORRUPTED;
        }
        return 0;
}


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and then called by ext4_xattr_inode_get():&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;        err = ext4_xattr_inode_verify_hashes(ea_inode, entry, buffer, size);
        /*
         * Compatibility check for old Lustre ea_inode implementation. Old
         * version does not have hash validation, but it has a backpointer
         * from ea_inode to the parent inode.
         */
        if (err == -EFSCORRUPTED) {
                if (EXT4_XATTR_INODE_GET_PARENT(ea_inode) != inode-&amp;gt;i_ino ||
                    ea_inode-&amp;gt;i_generation != inode-&amp;gt;i_generation) {
                        ext4_warning_inode(ea_inode,
                                           &quot;EA inode hash validation failed&quot;);
                        goto out;
                }
                /* Do not add ea_inode to the cache. */
                ea_inode_cache = NULL;
        } else if (err)
                goto out;


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="201474" author="adilger" created="Mon, 10 Jul 2017 04:37:43 +0000"  >&lt;p&gt;So it looks like all that is needed is to set &lt;tt&gt;err = 0&lt;/tt&gt; in the case that the parent inode and generation match (&quot;Do not add ea_inode to the cache&quot;) . That must be true or the error would have been printed. &lt;/p&gt;

&lt;p&gt;Could you please give that a try?  If that fixes the problem then please attach the patch here for review and then we can send it upstream. &lt;/p&gt;</comment>
                            <comment id="201486" author="emoly.liu" created="Mon, 10 Jul 2017 08:03:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt;, with the following fix, all the tests can pass.&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;diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index ce12c3f..c7876c2 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -451,6 +451,7 @@ static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
                }
                /* Do not add ea_inode to the cache. */
                ea_inode_cache = NULL;
+               err = 0;
        } else if (err)
                goto out;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="201489" author="emoly.liu" created="Mon, 10 Jul 2017 08:29:44 +0000"  >&lt;p&gt;I just uploaded the latest testing results here.&lt;/p&gt;</comment>
                            <comment id="201684" author="adilger" created="Tue, 11 Jul 2017 15:34:42 +0000"  >&lt;p&gt;Emoly, can you please make a patch (git commit) for this on the ext4 &quot;next&quot; branch, with a proper commit comment with &lt;tt&gt;Intel-bug-id: &lt;a href=&quot;https://jira.hpdd.intel.com/browse/LU-9723&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jira.hpdd.intel.com/browse/LU-9723&lt;/a&gt;&lt;/tt&gt; and &lt;tt&gt;Signed-off-by:&lt;/tt&gt; line, and then send it to the list with &quot;&lt;tt&gt;git send&amp;#45;email &amp;#45;&amp;#45;to tytso@mit.edu &amp;#45;&amp;#45;cc linux-ext4@vger.kernel.org&lt;/tt&gt;&quot;.  This should be done as soon as possible so that it will be included with the patch series going upstream.&lt;/p&gt;</comment>
                            <comment id="201734" author="emoly.liu" created="Wed, 12 Jul 2017 00:49:04 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt;, do you mean ext4 &quot;dev&quot; branch? There is no &quot;next&quot; branch at &lt;a href=&quot;https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git&lt;/a&gt;&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;-sh-4.1$ git branch -a
  dev
* master
  remotes/origin/3.2-punch-fix
  remotes/origin/HEAD -&amp;gt; origin/master
  remotes/origin/backport-to-3.10
  remotes/origin/crypto
  remotes/origin/crypto-3.14
  remotes/origin/dev
  remotes/origin/ext4-tools
  remotes/origin/for-stable
  remotes/origin/fscrypt
  remotes/origin/lazy_journal
  remotes/origin/master
  remotes/origin/origin
  remotes/origin/test
  remotes/origin/test-mb_generate_buddy-failure
  remotes/origin/unstable
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="201737" author="emoly.liu" created="Wed, 12 Jul 2017 03:58:47 +0000"  >&lt;p&gt;Done.&lt;/p&gt;</comment>
                            <comment id="202959" author="adilger" created="Thu, 20 Jul 2017 16:29:23 +0000"  >&lt;p&gt;I just talked with Ted, and the patch will be included into the next release.&#160;&lt;/p&gt;</comment>
                            <comment id="204622" author="emoly.liu" created="Mon, 7 Aug 2017 07:03:53 +0000"  >&lt;p&gt;This patch has been landed to ext4 upstream:&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;commit 191eac33009e6a6d31e87cfa425a20d0e79704b4
Author: Emoly Liu &amp;lt;emoly.liu@intel.com&amp;gt;
Date:   Mon Jul 31 00:40:22 2017 -0400

    ext4: error should be cleared if ea_inode isn&apos;t added to the cache

    For Lustre, if ea_inode fails in hash validation but passes parent
    inode and generation checks, it won&apos;t be added to the cache as well
    as the error &quot;-EFSCORRUPTED&quot; should be cleared, otherwise it will
    cause &quot;Structure needs cleaning&quot; when running getfattr command.

    Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9723

    Cc: stable@vger.kernel.org
    Fixes: dec214d00e0d78a08b947d7dccdfdb84407a9f4d
    Signed-off-by: Emoly Liu &amp;lt;emoly.liu@intel.com&amp;gt;
    Signed-off-by: Theodore Ts&apos;o &amp;lt;tytso@mit.edu&amp;gt;
    Reviewed-by: Andreas Dilger &amp;lt;adilger@dilger.ca&amp;gt;
    Reviewed-by: tahsin@google.com
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="231676" author="adilger" created="Wed, 8 Aug 2018 21:03:34 +0000"  >&lt;p&gt;We are updating to e2fsprogs-1.44 for the 2.12 release, so we will now be using the upstream &lt;tt&gt;ea_inode&lt;/tt&gt; code in e2fsprogs at least.  At some point, maybe Ubuntu 18, we will also get the &lt;tt&gt;ea_inode&lt;/tt&gt; feature in ldiskfs, so that will be tested as part of those releases.&lt;/p&gt;</comment>
                            <comment id="231716" author="simmonsja" created="Thu, 9 Aug 2018 15:22:57 +0000"  >&lt;p&gt;Actually Ubuntu e2fsprogs is at version 1.44 so it has support for ea_inode already. Its Ubuntu16 that is lacking. BTW how much a difference is their between lustre e2fsprogs version and the normal e2fsprog 1.44 version?&lt;/p&gt;</comment>
                            <comment id="231777" author="adilger" created="Fri, 10 Aug 2018 03:11:00 +0000"  >&lt;p&gt;Many of the features in e2fsprogs-1.42.13 have been merged into e2fsprogs-1.44. The main exception is the dirdata patch. The remaining patches are mostly .spec files for different distros and functional improvements that do not affect the on-disk format. It may be that we could use an unpatched e2fsprogs-1.44 on the OST, but not yet on the MDT (this has not been tested).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="46931">LU-9724</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="27545" name="e2fsck.log" size="2392" author="emoly.liu" created="Mon, 10 Jul 2017 08:27:29 +0000"/>
                            <attachment id="27546" name="e2fsck_new.log" size="1920" author="emoly.liu" created="Mon, 10 Jul 2017 08:27:29 +0000"/>
                            <attachment id="27547" name="xattrs.ext4" size="65588" author="emoly.liu" created="Mon, 10 Jul 2017 08:27:30 +0000"/>
                            <attachment id="27548" name="xattrs.lustre" size="65578" author="emoly.liu" created="Mon, 10 Jul 2017 08:27:29 +0000"/>
                            <attachment id="27549" name="xattrs_after_new_e2fs.lustre" size="65578" author="emoly.liu" created="Mon, 10 Jul 2017 08:27:30 +0000"/>
                    </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|hzzfvz:</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>