fs/xfs/libxfs/xfs_inode_buf.h
Source file repositories/reference/linux-study-clean/fs/xfs/libxfs/xfs_inode_buf.h
File Facts
- System
- Linux kernel
- Corpus path
fs/xfs/libxfs/xfs_inode_buf.h- Extension
.h- Size
- 1813 bytes
- Lines
- 57
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct xfs_inodestruct xfs_dinodestruct xfs_imapfunction xfs_inode_encode_bigtimefunction xfs_dinode_good_version
Annotated Snippet
struct xfs_imap {
xfs_agblock_t im_agbno; /* starting agbno of inode cluster */
unsigned short im_boffset; /* offset in inode cluster in bytes */
} __packed;
int xfs_read_icluster(struct xfs_perag *pag, struct xfs_trans *tp,
xfs_agblock_t agbno, struct xfs_buf **bpp);
void xfs_dinode_calc_crc(struct xfs_mount *mp, struct xfs_dinode *dip);
void xfs_inode_to_disk(struct xfs_inode *ip, struct xfs_dinode *to,
xfs_lsn_t lsn);
int xfs_inode_from_disk(struct xfs_inode *ip, struct xfs_dinode *from);
xfs_failaddr_t xfs_dinode_verify(struct xfs_mount *mp, xfs_ino_t ino,
struct xfs_dinode *dip);
xfs_failaddr_t xfs_dinode_verify_metadir(struct xfs_mount *mp,
struct xfs_dinode *dip, uint16_t mode, uint16_t flags,
uint64_t flags2);
xfs_failaddr_t xfs_inode_validate_extsize(struct xfs_mount *mp,
uint32_t extsize, uint16_t mode, uint16_t flags);
xfs_failaddr_t xfs_inode_validate_cowextsize(struct xfs_mount *mp,
uint32_t cowextsize, uint16_t mode, uint16_t flags,
uint64_t flags2);
static inline uint64_t xfs_inode_encode_bigtime(struct timespec64 tv)
{
return xfs_unix_to_bigtime(tv.tv_sec) * NSEC_PER_SEC + tv.tv_nsec;
}
struct timespec64 xfs_inode_from_disk_ts(struct xfs_dinode *dip,
const xfs_timestamp_t ts);
static inline bool
xfs_dinode_good_version(struct xfs_mount *mp, uint8_t version)
{
if (xfs_has_v3inodes(mp))
return version == 3;
return version == 1 || version == 2;
}
#endif /* __XFS_INODE_BUF_H__ */
Annotation
- Detected declarations: `struct xfs_inode`, `struct xfs_dinode`, `struct xfs_imap`, `function xfs_inode_encode_bigtime`, `function xfs_dinode_good_version`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.