drivers/md/dm-vdo/int-map.h
Source file repositories/reference/linux-study-clean/drivers/md/dm-vdo/int-map.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-vdo/int-map.h- Extension
.h- Size
- 1106 bytes
- Lines
- 40
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler.hlinux/types.h
Detected Declarations
struct int_map
Annotated Snippet
#ifndef VDO_INT_MAP_H
#define VDO_INT_MAP_H
#include <linux/compiler.h>
#include <linux/types.h>
/**
* DOC: int_map
*
* An int_map associates pointers (void *) with integer keys (u64). NULL pointer values are
* not supported.
*
* The map is implemented as hash table, which should provide constant-time insert, query, and
* remove operations, although the insert may occasionally grow the table, which is linear in the
* number of entries in the map. The table will grow as needed to hold new entries, but will not
* shrink as entries are removed.
*/
struct int_map;
int __must_check vdo_int_map_create(size_t initial_capacity, struct int_map **map_ptr);
void vdo_int_map_free(struct int_map *map);
size_t vdo_int_map_size(const struct int_map *map);
void *vdo_int_map_get(struct int_map *map, u64 key);
int __must_check vdo_int_map_put(struct int_map *map, u64 key, void *new_value,
bool update, void **old_value_ptr);
void *vdo_int_map_remove(struct int_map *map, u64 key);
#endif /* VDO_INT_MAP_H */
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/types.h`.
- Detected declarations: `struct int_map`.
- Atlas domain: Driver Families / drivers/md.
- 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.