xref: /OK3568_Linux_fs/kernel/Documentation/filesystems/ext4/eainode.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunLarge Extended Attribute Values
4*4882a593Smuzhiyun-------------------------------
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunTo enable ext4 to store extended attribute values that do not fit in the
7*4882a593Smuzhiyuninode or in the single extended attribute block attached to an inode,
8*4882a593Smuzhiyunthe EA\_INODE feature allows us to store the value in the data blocks of
9*4882a593Smuzhiyuna regular file inode. This “EA inode” is linked only from the extended
10*4882a593Smuzhiyunattribute name index and must not appear in a directory entry. The
11*4882a593Smuzhiyuninode's i\_atime field is used to store a checksum of the xattr value;
12*4882a593Smuzhiyunand i\_ctime/i\_version store a 64-bit reference count, which enables
13*4882a593Smuzhiyunsharing of large xattr values between multiple owning inodes. For
14*4882a593Smuzhiyunbackward compatibility with older versions of this feature, the
15*4882a593Smuzhiyuni\_mtime/i\_generation *may* store a back-reference to the inode number
16*4882a593Smuzhiyunand i\_generation of the **one** owning inode (in cases where the EA
17*4882a593Smuzhiyuninode is not referenced by multiple inodes) to verify that the EA inode
18*4882a593Smuzhiyunis the correct one being accessed.
19