fs/ceph/metric.h
Source file repositories/reference/linux-study-clean/fs/ceph/metric.h
File Facts
- System
- Linux kernel
- Corpus path
fs/ceph/metric.h- Extension
.h- Size
- 7439 bytes
- Lines
- 282
- 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/ceph/types.hlinux/percpu_counter.hlinux/ktime.h
Detected Declarations
struct ceph_metric_headerstruct ceph_metric_capstruct ceph_metric_read_latencystruct ceph_metric_write_latencystruct ceph_metric_metadata_latencystruct ceph_metric_dleasestruct ceph_opened_filesstruct ceph_pinned_icapsstruct ceph_opened_inodesstruct ceph_read_io_sizestruct ceph_write_io_sizestruct ceph_subvolume_metric_entry_wirestruct ceph_subvolume_metric_entrystruct ceph_metric_headstruct ceph_metricstruct ceph_client_metricenum ceph_metric_typeenum metric_typefunction metric_schedule_delayedfunction ceph_update_cap_hitfunction ceph_update_cap_misfunction ceph_update_read_metricsfunction ceph_update_write_metricsfunction ceph_update_metadata_metricsfunction ceph_update_copyfrom_metrics
Annotated Snippet
struct ceph_metric_header {
__le32 type; /* ceph metric type */
__u8 ver;
__u8 compat;
__le32 data_len; /* length of sizeof(hit + mis + total) */
} __packed;
/* metric caps header */
struct ceph_metric_cap {
struct ceph_metric_header header;
__le64 hit;
__le64 mis;
__le64 total;
} __packed;
/* metric read latency header */
struct ceph_metric_read_latency {
struct ceph_metric_header header;
struct ceph_timespec lat;
struct ceph_timespec avg;
__le64 sq_sum;
__le64 count;
} __packed;
/* metric write latency header */
struct ceph_metric_write_latency {
struct ceph_metric_header header;
struct ceph_timespec lat;
struct ceph_timespec avg;
__le64 sq_sum;
__le64 count;
} __packed;
/* metric metadata latency header */
struct ceph_metric_metadata_latency {
struct ceph_metric_header header;
struct ceph_timespec lat;
struct ceph_timespec avg;
__le64 sq_sum;
__le64 count;
} __packed;
/* metric dentry lease header */
struct ceph_metric_dlease {
struct ceph_metric_header header;
__le64 hit;
__le64 mis;
__le64 total;
} __packed;
/* metric opened files header */
struct ceph_opened_files {
struct ceph_metric_header header;
__le64 opened_files;
__le64 total;
} __packed;
/* metric pinned i_caps header */
struct ceph_pinned_icaps {
struct ceph_metric_header header;
__le64 pinned_icaps;
__le64 total;
} __packed;
/* metric opened inodes header */
struct ceph_opened_inodes {
struct ceph_metric_header header;
__le64 opened_inodes;
__le64 total;
} __packed;
/* metric read io size header */
struct ceph_read_io_size {
struct ceph_metric_header header;
__le64 total_ops;
__le64 total_size;
} __packed;
/* metric write io size header */
struct ceph_write_io_size {
struct ceph_metric_header header;
__le64 total_ops;
__le64 total_size;
} __packed;
/**
* struct ceph_subvolume_metric_entry_wire - On-wire format sent to MDS
* @subvolume_id: Subvolume identifier
* @read_ops: Read operation count (32-bit, clamped from 64-bit internal)
* @write_ops: Write operation count (32-bit, clamped from 64-bit internal)
Annotation
- Immediate include surface: `linux/ceph/types.h`, `linux/percpu_counter.h`, `linux/ktime.h`.
- Detected declarations: `struct ceph_metric_header`, `struct ceph_metric_cap`, `struct ceph_metric_read_latency`, `struct ceph_metric_write_latency`, `struct ceph_metric_metadata_latency`, `struct ceph_metric_dlease`, `struct ceph_opened_files`, `struct ceph_pinned_icaps`, `struct ceph_opened_inodes`, `struct ceph_read_io_size`.
- 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.