drivers/md/dm-vdo/indexer/indexer.h

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

File Facts

System
Linux kernel
Corpus path
drivers/md/dm-vdo/indexer/indexer.h
Extension
.h
Size
12713 bytes
Lines
353
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 uds_record_name {
	unsigned char name[UDS_RECORD_NAME_SIZE];
};

struct uds_record_data {
	unsigned char data[UDS_RECORD_DATA_SIZE];
};

struct uds_volume_record {
	struct uds_record_name name;
	struct uds_record_data data;
};

struct uds_parameters {
	/* The block_device used for storage */
	struct block_device *bdev;
	/* The maximum allowable size of the index on storage */
	size_t size;
	/* The offset where the index should start */
	off_t offset;
	/* The maximum memory allocation, in GB */
	uds_memory_config_size_t memory_size;
	/* Whether the index should include sparse chapters */
	bool sparse;
	/* A 64-bit nonce to validate the index */
	u64 nonce;
	/* The number of threads used to process index requests */
	unsigned int zone_count;
	/* The number of threads used to read volume pages */
	unsigned int read_threads;
};

/*
 * These statistics capture characteristics of the current index, including resource usage and
 * requests processed since the index was opened.
 */
struct uds_index_stats {
	/* The total number of records stored in the index */
	u64 entries_indexed;
	/* An estimate of the index's memory usage, in bytes */
	u64 memory_used;
	/* The number of collisions recorded in the volume index */
	u64 collisions;
	/* The number of entries discarded from the index since startup */
	u64 entries_discarded;
	/* The time at which these statistics were fetched */
	s64 current_time;
	/* The number of post calls that found an existing entry */
	u64 posts_found;
	/* The number of post calls that added an entry */
	u64 posts_not_found;
	/*
	 * The number of post calls that found an existing entry that is current enough to only
	 * exist in memory and not have been committed to disk yet
	 */
	u64 in_memory_posts_found;
	/*
	 * The number of post calls that found an existing entry in the dense portion of the index
	 */
	u64 dense_posts_found;
	/*
	 * The number of post calls that found an existing entry in the sparse portion of the index
	 */
	u64 sparse_posts_found;
	/* The number of update calls that updated an existing entry */
	u64 updates_found;
	/* The number of update calls that added a new entry */
	u64 updates_not_found;
	/* The number of delete requests that deleted an existing entry */
	u64 deletions_found;
	/* The number of delete requests that did nothing */
	u64 deletions_not_found;
	/* The number of query calls that found existing entry */
	u64 queries_found;
	/* The number of query calls that did not find an entry */
	u64 queries_not_found;
	/* The total number of requests processed */
	u64 requests;
};

enum uds_index_region {
	/* No location information has been determined */
	UDS_LOCATION_UNKNOWN = 0,
	/* The index page entry has been found */
	UDS_LOCATION_INDEX_PAGE_LOOKUP,
	/* The record page entry has been found */
	UDS_LOCATION_RECORD_PAGE_LOOKUP,
	/* The record is not in the index */
	UDS_LOCATION_UNAVAILABLE,
	/* The record was found in the open chapter */

Annotation

Implementation Notes