include/uapi/linux/blktrace_api.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/blktrace_api.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/blktrace_api.h- Extension
.h- Size
- 6430 bytes
- Lines
- 198
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- 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
linux/types.h
Detected Declarations
struct blk_io_tracestruct blk_io_trace2struct blk_io_trace_remapstruct blk_user_trace_setupstruct blk_user_trace_setup2enum blktrace_catenum blktrace_actenum blktrace_notify
Annotated Snippet
struct blk_io_trace {
__u32 magic; /* MAGIC << 8 | version */
__u32 sequence; /* event number */
__u64 time; /* in nanoseconds */
__u64 sector; /* disk offset */
__u32 bytes; /* transfer length */
__u32 action; /* what happened */
__u32 pid; /* who did it */
__u32 device; /* device number */
__u32 cpu; /* on what cpu did it happen */
__u16 error; /* completion error */
__u16 pdu_len; /* length of data after this trace */
/* cgroup id will be stored here if exists */
};
struct blk_io_trace2 {
__u32 magic; /* MAGIC << 8 | BLK_IO_TRACE2_VERSION */
__u32 sequence; /* event number */
__u64 time; /* in nanoseconds */
__u64 sector; /* disk offset */
__u32 bytes; /* transfer length */
__u32 pid; /* who did it */
__u64 action; /* what happened */
__u32 device; /* device number */
__u32 cpu; /* on what cpu did it happen */
__u16 error; /* completion error */
__u16 pdu_len; /* length of data after this trace */
__u8 pad[12];
/* cgroup id will be stored here if it exists */
};
/*
* The remap event
*/
struct blk_io_trace_remap {
__be32 device_from;
__be32 device_to;
__be64 sector_from;
};
enum {
Blktrace_setup = 1,
Blktrace_running,
Blktrace_stopped,
};
#define BLKTRACE_BDEV_SIZE 32
#define BLKTRACE_BDEV_SIZE2 64
/*
* User setup structure passed with BLKTRACESETUP
*/
struct blk_user_trace_setup {
char name[BLKTRACE_BDEV_SIZE]; /* output */
__u16 act_mask; /* input */
__u32 buf_size; /* input */
__u32 buf_nr; /* input */
__u64 start_lba;
__u64 end_lba;
__u32 pid;
};
/*
* User setup structure passed with BLKTRACESETUP2
*/
struct blk_user_trace_setup2 {
char name[BLKTRACE_BDEV_SIZE2]; /* output */
__u64 act_mask; /* input */
__u32 buf_size; /* input */
__u32 buf_nr; /* input */
__u64 start_lba;
__u64 end_lba;
__u32 pid;
__u32 flags; /* currently unused */
__u64 reserved[11];
};
#endif /* _UAPIBLKTRACE_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct blk_io_trace`, `struct blk_io_trace2`, `struct blk_io_trace_remap`, `struct blk_user_trace_setup`, `struct blk_user_trace_setup2`, `enum blktrace_cat`, `enum blktrace_act`, `enum blktrace_notify`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.