drivers/md/dm-vdo/statistics.h

Source file repositories/reference/linux-study-clean/drivers/md/dm-vdo/statistics.h

File Facts

System
Linux kernel
Corpus path
drivers/md/dm-vdo/statistics.h
Extension
.h
Size
8934 bytes
Lines
279
Domain
Driver Families
Bucket
drivers/md
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct block_allocator_statistics {
	/* The total number of slabs from which blocks may be allocated */
	u64 slab_count;
	/* The total number of slabs from which blocks have ever been allocated */
	u64 slabs_opened;
	/* The number of times since loading that a slab has been re-opened */
	u64 slabs_reopened;
};

/**
 * Counters for tracking the number of items written (blocks, requests, etc.)
 * that keep track of totals at steps in the write pipeline. Three counters
 * allow the number of buffered, in-memory items and the number of in-flight,
 * unacknowledged writes to be derived, while still tracking totals for
 * reporting purposes
 */
struct commit_statistics {
	/* The total number of items on which processing has started */
	u64 started;
	/* The total number of items for which a write operation has been issued */
	u64 written;
	/* The total number of items for which a write operation has completed */
	u64 committed;
};

/** Counters for events in the recovery journal */
struct recovery_journal_statistics {
	/* Number of times the on-disk journal was full */
	u64 disk_full;
	/* Number of times the recovery journal requested slab journal commits. */
	u64 slab_journal_commits_requested;
	/* Write/Commit totals for individual journal entries */
	struct commit_statistics entries;
	/* Write/Commit totals for journal blocks */
	struct commit_statistics blocks;
};

/** The statistics for the compressed block packer. */
struct packer_statistics {
	/* Number of compressed data items written since startup */
	u64 compressed_fragments_written;
	/* Number of blocks containing compressed items written since startup */
	u64 compressed_blocks_written;
	/* Number of VIOs that are pending in the packer */
	u64 compressed_fragments_in_packer;
};

/** The statistics for the slab journals. */
struct slab_journal_statistics {
	/* Number of times the on-disk journal was full */
	u64 disk_full_count;
	/* Number of times an entry was added over the flush threshold */
	u64 flush_count;
	/* Number of times an entry was added over the block threshold */
	u64 blocked_count;
	/* Number of times a tail block was written */
	u64 blocks_written;
	/* Number of times we had to wait for the tail to write */
	u64 tail_busy_count;
};

/** The statistics for the slab summary. */
struct slab_summary_statistics {
	/* Number of blocks written */
	u64 blocks_written;
};

/** The statistics for the reference counts. */
struct ref_counts_statistics {
	/* Number of reference blocks written */
	u64 blocks_written;
};

/** The statistics for the block map. */
struct block_map_statistics {
	/* number of dirty (resident) pages */
	u32 dirty_pages;
	/* number of clean (resident) pages */
	u32 clean_pages;
	/* number of free pages */
	u32 free_pages;
	/* number of pages in failed state */
	u32 failed_pages;
	/* number of pages incoming */
	u32 incoming_pages;
	/* number of pages outgoing */
	u32 outgoing_pages;
	/* how many times free page not avail */
	u32 cache_pressure;
	/* number of get_vdo_page() calls for read */

Annotation

Implementation Notes