162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciLarge Extended Attribute Values
462306a36Sopenharmony_ci-------------------------------
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciTo enable ext4 to store extended attribute values that do not fit in the
762306a36Sopenharmony_ciinode or in the single extended attribute block attached to an inode,
862306a36Sopenharmony_cithe EA_INODE feature allows us to store the value in the data blocks of
962306a36Sopenharmony_cia regular file inode. This “EA inode” is linked only from the extended
1062306a36Sopenharmony_ciattribute name index and must not appear in a directory entry. The
1162306a36Sopenharmony_ciinode's i_atime field is used to store a checksum of the xattr value;
1262306a36Sopenharmony_ciand i_ctime/i_version store a 64-bit reference count, which enables
1362306a36Sopenharmony_cisharing of large xattr values between multiple owning inodes. For
1462306a36Sopenharmony_cibackward compatibility with older versions of this feature, the
1562306a36Sopenharmony_cii_mtime/i_generation *may* store a back-reference to the inode number
1662306a36Sopenharmony_ciand i_generation of the **one** owning inode (in cases where the EA
1762306a36Sopenharmony_ciinode is not referenced by multiple inodes) to verify that the EA inode
1862306a36Sopenharmony_ciis the correct one being accessed.
19