fs/zonefs/trace.h
Source file repositories/reference/linux-study-clean/fs/zonefs/trace.h
File Facts
- System
- Linux kernel
- Corpus path
fs/zonefs/trace.h- Extension
.h- Size
- 3026 bytes
- Lines
- 107
- 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
linux/tracepoint.hlinux/trace_seq.hlinux/blkdev.hzonefs.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM zonefs
#if !defined(_TRACE_ZONEFS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_ZONEFS_H
#include <linux/tracepoint.h>
#include <linux/trace_seq.h>
#include <linux/blkdev.h>
#include "zonefs.h"
#define show_dev(dev) MAJOR(dev), MINOR(dev)
TRACE_EVENT(zonefs_zone_mgmt,
TP_PROTO(struct super_block *sb, struct zonefs_zone *z,
enum req_op op),
TP_ARGS(sb, z, op),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(u64, ino)
__field(enum req_op, op)
__field(sector_t, sector)
__field(sector_t, nr_sectors)
),
TP_fast_assign(
__entry->dev = sb->s_dev;
__entry->ino =
z->z_sector >> ZONEFS_SB(sb)->s_zone_sectors_shift;
__entry->op = op;
__entry->sector = z->z_sector;
__entry->nr_sectors = z->z_size >> SECTOR_SHIFT;
),
TP_printk("bdev=(%d,%d), ino=%llu op=%s, sector=%llu, nr_sectors=%llu",
show_dev(__entry->dev), __entry->ino,
blk_op_str(__entry->op), __entry->sector,
__entry->nr_sectors
)
);
TRACE_EVENT(zonefs_file_dio_append,
TP_PROTO(struct inode *inode, ssize_t size, ssize_t ret),
TP_ARGS(inode, size, ret),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(u64, ino)
__field(sector_t, sector)
__field(ssize_t, size)
__field(loff_t, wpoffset)
__field(ssize_t, ret)
),
TP_fast_assign(
__entry->dev = inode->i_sb->s_dev;
__entry->ino = inode->i_ino;
__entry->sector = zonefs_inode_zone(inode)->z_sector;
__entry->size = size;
__entry->wpoffset =
zonefs_inode_zone(inode)->z_wpoffset;
__entry->ret = ret;
),
TP_printk("bdev=(%d, %d), ino=%llu, sector=%llu, size=%zu, wpoffset=%llu, ret=%zu",
show_dev(__entry->dev), __entry->ino,
__entry->sector, __entry->size, __entry->wpoffset,
__entry->ret
)
);
TRACE_EVENT(zonefs_iomap_begin,
TP_PROTO(struct inode *inode, struct iomap *iomap),
TP_ARGS(inode, iomap),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(u64, ino)
__field(u64, addr)
__field(loff_t, offset)
__field(u64, length)
),
TP_fast_assign(
__entry->dev = inode->i_sb->s_dev;
__entry->ino = inode->i_ino;
__entry->addr = iomap->addr;
__entry->offset = iomap->offset;
__entry->length = iomap->length;
),
TP_printk("bdev=(%d,%d), ino=%llu, addr=%llu, offset=%llu, length=%llu",
show_dev(__entry->dev), __entry->ino,
__entry->addr, __entry->offset, __entry->length
)
);
Annotation
- Immediate include surface: `linux/tracepoint.h`, `linux/trace_seq.h`, `linux/blkdev.h`, `zonefs.h`, `trace/define_trace.h`.
- 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.