block/partitions/ldm.h

Source file repositories/reference/linux-study-clean/block/partitions/ldm.h

File Facts

System
Linux kernel
Corpus path
block/partitions/ldm.h
Extension
.h
Size
4642 bytes
Lines
194
Domain
Representative Device Path
Bucket
PCIe NVMe Storage Path
Inferred role
Representative Device Path: implementation source
Status
source implementation candidate

Why This File Exists

Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.

Dependency Surface

Detected Declarations

Annotated Snippet

struct frag {				/* VBLK Fragment handling */
	struct list_head list;
	u32		group;
	u8		num;		/* Total number of records */
	u8		rec;		/* This is record number n */
	u8		map;		/* Which portions are in use */
	u8		data[];
};

/* In memory LDM database structures. */

struct privhead {			/* Offsets and sizes are in sectors. */
	u16	ver_major;
	u16	ver_minor;
	u64	logical_disk_start;
	u64	logical_disk_size;
	u64	config_start;
	u64	config_size;
	uuid_t	disk_id;
};

struct tocblock {			/* We have exactly two bitmaps. */
	u8	bitmap1_name[16];
	u64	bitmap1_start;
	u64	bitmap1_size;
	u8	bitmap2_name[16];
	u64	bitmap2_start;
	u64	bitmap2_size;
};

struct vmdb {				/* VMDB: The database header */
	u16	ver_major;
	u16	ver_minor;
	u32	vblk_size;
	u32	vblk_offset;
	u32	last_vblk_seq;
};

struct vblk_comp {			/* VBLK Component */
	u8	state[16];
	u64	parent_id;
	u8	type;
	u8	children;
	u16	chunksize;
};

struct vblk_dgrp {			/* VBLK Disk Group */
	u8	disk_id[64];
};

struct vblk_disk {			/* VBLK Disk */
	uuid_t	disk_id;
	u8	alt_name[128];
};

struct vblk_part {			/* VBLK Partition */
	u64	start;
	u64	size;			/* start, size and vol_off in sectors */
	u64	volume_offset;
	u64	parent_id;
	u64	disk_id;
	u8	partnum;
};

struct vblk_volu {			/* VBLK Volume */
	u8	volume_type[16];
	u8	volume_state[16];
	u8	guid[16];
	u8	drive_hint[4];
	u64	size;
	u8	partition_type;
};

struct vblk_head {			/* VBLK standard header */
	u32 group;
	u16 rec;
	u16 nrec;
};

struct vblk {				/* Generalised VBLK */
	u8	name[64];
	u64	obj_id;
	u32	sequence;
	u8	flags;
	u8	type;
	union {
		struct vblk_comp comp;
		struct vblk_dgrp dgrp;
		struct vblk_disk disk;
		struct vblk_part part;

Annotation

Implementation Notes