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.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/list.hlinux/fs.hlinux/unaligned.hasm/byteorder.h
Detected Declarations
struct parsed_partitionsstruct fragstruct privheadstruct tocblockstruct vmdbstruct vblk_compstruct vblk_dgrpstruct vblk_diskstruct vblk_partstruct vblk_volustruct vblk_headstruct vblkstruct ldmdb
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
- Immediate include surface: `linux/types.h`, `linux/list.h`, `linux/fs.h`, `linux/unaligned.h`, `asm/byteorder.h`.
- Detected declarations: `struct parsed_partitions`, `struct frag`, `struct privhead`, `struct tocblock`, `struct vmdb`, `struct vblk_comp`, `struct vblk_dgrp`, `struct vblk_disk`, `struct vblk_part`, `struct vblk_volu`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- 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.