xref: /openbmc/linux/Documentation/filesystems/ext4/eainode.rst (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
18a98ec7cSDarrick J. Wong.. SPDX-License-Identifier: GPL-2.0
28a98ec7cSDarrick J. Wong
38a98ec7cSDarrick J. WongLarge Extended Attribute Values
48a98ec7cSDarrick J. Wong-------------------------------
58a98ec7cSDarrick J. Wong
68a98ec7cSDarrick J. WongTo enable ext4 to store extended attribute values that do not fit in the
78a98ec7cSDarrick J. Wonginode or in the single extended attribute block attached to an inode,
8*3103084aSWang Jianjianthe EA_INODE feature allows us to store the value in the data blocks of
98a98ec7cSDarrick J. Wonga regular file inode. This “EA inode” is linked only from the extended
108a98ec7cSDarrick J. Wongattribute name index and must not appear in a directory entry. The
11*3103084aSWang Jianjianinode's i_atime field is used to store a checksum of the xattr value;
12*3103084aSWang Jianjianand i_ctime/i_version store a 64-bit reference count, which enables
138a98ec7cSDarrick J. Wongsharing of large xattr values between multiple owning inodes. For
148a98ec7cSDarrick J. Wongbackward compatibility with older versions of this feature, the
15*3103084aSWang Jianjiani_mtime/i_generation *may* store a back-reference to the inode number
16*3103084aSWang Jianjianand i_generation of the **one** owning inode (in cases where the EA
178a98ec7cSDarrick J. Wonginode is not referenced by multiple inodes) to verify that the EA inode
188a98ec7cSDarrick J. Wongis the correct one being accessed.
19