1 /* 2 * Copyright 2020, Shubham Bhagat, shubhambhagat111@yahoo.com 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _XFS_TYPES_H_ 6 #define _XFS_TYPES_H_ 7 8 #include "system_dependencies.h" 9 10 /* 11 Reference documentation: 12 https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/docs 13 /xfs_filesystem_structure.pdf 14 15 Chapter 5: Common XFS types (Page 8) 16 17 These are on-disk data types (how the data is stored on disk) 18 */ 19 20 21 typedef uint64 xfs_ino_t; // absolute inode number 22 typedef int64 xfs_off_t; // file offset 23 typedef int64 xfs_daddr_t; // device address 24 typedef uint32 xfs_agnumber_t; // Allocation Group (AG) number 25 typedef uint32 xfs_agblock_t; // AG relative block number 26 typedef uint32 xfs_extlen_t; // extent length in blocks 27 typedef int32 xfs_extnum_t; // number of extends in a file 28 typedef int16 xfs_aextnum_t; // number of extents in an attribute fork 29 typedef uint32 xfs_dablk_t; // block number for directories 30 // and extended attributes 31 typedef uint32 xfs_dahash_t; // hash of a directory file name 32 // or extended attribute name 33 typedef uint64 xfs_fsblock_t; // filesystem block number combining AG number 34 typedef uint64 xfs_rfsblock_t; // raw filesystem block number 35 typedef uint64 xfs_rtblock_t; // extent number in the real-time sub-volume 36 typedef uint64 xfs_fileoff_t; // block offset into a file 37 typedef uint64 xfs_filblks_t; // block count for a file 38 typedef int64 xfs_fsize_t; // byte size of a file 39 typedef int64 xfs_lsn_t; // log sequence number 40 typedef xfs_fileoff_t TreeKey; 41 typedef xfs_fsblock_t TreePointer; 42 43 // typedef unsigned char uuid_t[16]; 44 45 #endif 46