^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Large Extended Attribute Values
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) -------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) To enable ext4 to store extended attribute values that do not fit in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) inode or in the single extended attribute block attached to an inode,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) the EA\_INODE feature allows us to store the value in the data blocks of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) a regular file inode. This “EA inode” is linked only from the extended
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) attribute name index and must not appear in a directory entry. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) inode's i\_atime field is used to store a checksum of the xattr value;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) and i\_ctime/i\_version store a 64-bit reference count, which enables
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) sharing of large xattr values between multiple owning inodes. For
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) backward compatibility with older versions of this feature, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) i\_mtime/i\_generation *may* store a back-reference to the inode number
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) and i\_generation of the **one** owning inode (in cases where the EA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) inode is not referenced by multiple inodes) to verify that the EA inode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) is the correct one being accessed.