[LU-9724] update ext4-large-eas.patch to match upstream ext4 feature Created: 29/Jun/17  Updated: 11/Apr/18  Resolved: 27/Feb/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.0, Lustre 2.7.0
Fix Version/s: Lustre 2.11.0

Type: Task Priority: Major
Reporter: Andreas Dilger Assignee: Emoly Liu
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-6220 push ext4/ldiskfs patches upstream if... Open
is related to LU-1732 enable wide striping by default Resolved
is related to LU-9723 test large xattr (ea_inode) patch int... Resolved
is related to LU-908 multi-block xattr support Resolved
Rank (Obsolete): 9223372036854775807

 Description   

In order to match the enhanced ea_inode functionality being landed to the upstream ext4 kernel tree, we need to modify our ext4-large-eas.patch and e2fsprogs patches to start properly initializing some of the fields we don't currently use to minimize the interoperability issues.

In particular, the new EA inode refcount should be initialized to 1, and hash field should be computed based on the xattr value as it is in the upstream kernel patch. We don't need to backport any of the xattr sharing functionality, since Lustre never shares large xattrs as the lov and link xattrs are always unique. This can be landed to master for the 2.11 release, and possibly included into 2.10.1 or later maintenance release.

For e2fsck we should set the EA inode refcount = 1 and set the hash on large xattrs that are found during scanning and are otherwise valid. This should be done in a manner that is not alarming to existing users, such as printing a fix_problem() message like:
noformat
Found old-style Lustre large xattr inode(s) without refcount or hash. Fix?
noformat
and then together with something like PR_1_SUPPRESS_MESSAGES and a new PR_LATCH_EA_INODE it should prompt and save the answer to re-use it when repairing all such large xattrs rather than prompting to repair each one (which might be millions of files on a large filesystem with many stripes).



 Comments   
Comment by Emoly Liu [ 25/Jan/18 ]

Andreas,
I check the upstream ext4 kernel and want to make sure if the following code from ext4_xattr_inode_create() needs to be changed to ldiskfs kernel:

	if (!IS_ERR(ea_inode)) {
		...
		ext4_xattr_inode_set_ref(ea_inode, 1);
		ext4_xattr_inode_set_hash(ea_inode, hash);
		...
        }

And all the kernel series need this change?

Thanks,
Emoly

Comment by Gerrit Updater [ 26/Jan/18 ]

Emoly Liu (emoly.liu@intel.com) uploaded a new patch: https://review.whamcloud.com/31033
Subject: LU-9724 ldiskfs: update ext4-large-eas.patch to match upstream ext4
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fc12bcaa392da4d5ea2e28d61ef0be42d5367193

Comment by Gerrit Updater [ 27/Feb/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31033/
Subject: LU-9724 ldiskfs: update ext4-large-eas.patch to match upstream ext4
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8c8f4920e0157b2f1617b7d6da3f758781d68642

Comment by Peter Jones [ 27/Feb/18 ]

Landed for 2.11

Generated at Sat Feb 10 02:28:40 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.