di_format
. It always starts at offset 100 (0x64) in the inode's space which is the start of the inode's "literal area". The size of the data fork is determined by the type and format. The maximum size is determined by the inode size and di_forkoff
. In code, use the XFS_DFORK_PTR
macro specifying XFS_DATA_FORK
for the "which" parameter. Alternatively, the XFS_DFORK_DPTR
macro can be used.
XFS_DINODE_FMT_EXTENTS
: The extent data is fully contained within the inode which contains an array of extents to the filesystem blocks for the file's data. To access the extents, cast the return value from XFS_DFORK_DPTR
to xfs_bmbt_rec_t*
.
XFS_DINODE_FMT_BTREE
: The extent data is contained in the leaves of a B+tree. The inode contains the root node of the tree and is accessed by casting the return value from XFS_DFORK_DPTR
to xfs_bmdr_block_t*
.