tools/include/uapi/linux/stat.h
Source file repositories/reference/linux-study-clean/tools/include/uapi/linux/stat.h
File Facts
- System
- Linux kernel
- Corpus path
tools/include/uapi/linux/stat.h- Extension
.h- Size
- 7879 bytes
- Lines
- 261
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct statx_timestampstruct statx
Annotated Snippet
struct statx_timestamp {
__s64 tv_sec;
__u32 tv_nsec;
__s32 __reserved;
};
/*
* Structures for the extended file attribute retrieval system call
* (statx()).
*
* The caller passes a mask of what they're specifically interested in as a
* parameter to statx(). What statx() actually got will be indicated in
* st_mask upon return.
*
* For each bit in the mask argument:
*
* - if the datum is not supported:
*
* - the bit will be cleared, and
*
* - the datum will be set to an appropriate fabricated value if one is
* available (eg. CIFS can take a default uid and gid), otherwise
*
* - the field will be cleared;
*
* - otherwise, if explicitly requested:
*
* - the datum will be synchronised to the server if AT_STATX_FORCE_SYNC is
* set or if the datum is considered out of date, and
*
* - the field will be filled in and the bit will be set;
*
* - otherwise, if not requested, but available in approximate form without any
* effort, it will be filled in anyway, and the bit will be set upon return
* (it might not be up to date, however, and no attempt will be made to
* synchronise the internal state first);
*
* - otherwise the field and the bit will be cleared before returning.
*
* Items in STATX_BASIC_STATS may be marked unavailable on return, but they
* will have values installed for compatibility purposes so that stat() and
* co. can be emulated in userspace.
*/
struct statx {
/* 0x00 */
/* What results were written [uncond] */
__u32 stx_mask;
/* Preferred general I/O size [uncond] */
__u32 stx_blksize;
/* Flags conveying information about the file [uncond] */
__u64 stx_attributes;
/* 0x10 */
/* Number of hard links */
__u32 stx_nlink;
/* User ID of owner */
__u32 stx_uid;
/* Group ID of owner */
__u32 stx_gid;
/* File mode */
__u16 stx_mode;
__u16 __spare0[1];
/* 0x20 */
/* Inode number */
__u64 stx_ino;
/* File size */
__u64 stx_size;
/* Number of 512-byte blocks allocated */
__u64 stx_blocks;
/* Mask to show what's supported in stx_attributes */
__u64 stx_attributes_mask;
/* 0x40 */
/* Last access time */
struct statx_timestamp stx_atime;
/* File creation time */
struct statx_timestamp stx_btime;
/* Last attribute change time */
struct statx_timestamp stx_ctime;
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct statx_timestamp`, `struct statx`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.