drivers/md/dm-pcache/cache_dev.h

Source file repositories/reference/linux-study-clean/drivers/md/dm-pcache/cache_dev.h

File Facts

System
Linux kernel
Corpus path
drivers/md/dm-pcache/cache_dev.h
Extension
.h
Size
2239 bytes
Lines
71
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 pcache_sb {
	__le32 crc;
	__le32 flags;
	__le64 magic;

	__le32 seg_num;
};

struct pcache_cache_dev {
	u32				sb_flags;
	u32				seg_num;
	void				*mapping;
	bool				use_vmap;

	struct dm_dev			*dm_dev;

	struct mutex			seg_lock;
	unsigned long			*seg_bitmap;
};

struct dm_pcache;
int cache_dev_start(struct dm_pcache *pcache);
void cache_dev_stop(struct dm_pcache *pcache);

void cache_dev_zero_range(struct pcache_cache_dev *cache_dev, void *pos, u32 size);

int cache_dev_get_empty_segment_id(struct pcache_cache_dev *cache_dev, u32 *seg_id);

#endif /* _PCACHE_CACHE_DEV_H */

Annotation

Implementation Notes