ldm_get_disk_objid(9)
π
ldm_get_disk_objid β the ldm_get_disk_objid(9) glow-up
okay so real talk, this one lives in the Kernel API Manual, and it's a little function with a big job: it goes digging through a linked list of vblk's to find a given Disk Id. bestie, it's giving "detective with a flashlight in a server room" energy and honestly? iconic. π¦β¨
πΈ NAME πΈ
ldm_get_disk_objid β Search a linked list of vblk's for a given Disk Id
like, that's literally the whole assignment. find the disk id. slay. π
β¨ SYNOPSIS β¨
struct vblk * ldm_get_disk_objid (const struct ldmdb *ldb );
one function, one pointer in, one pointer out. no drama, no cap. π«Ά
π ARGUMENTS π
ldbβ Cache of the database structures β¨ this is the stash, the little wardrobe of db structs you're gonna rummage through, iykyk.
π¦ DESCRIPTION π¦
okay so picture this: the LDM Database contains a list of all partitions on all dynamic disks. like, all of them. every single one. π
The primary PRIVHEAD, sitting right at the beginning of the physical disk, tells us the GUID of this disk. that's the little name tag the disk wears at the party. π
So this function? it searches for the GUID in a linked list of vblk's. that's it. that's the vibe check. it walks the list, looking for the one that matches. main character energy, one job, does it well. π
β RETURN β
- Pointer β A matching vblk was found π periodt, we found it
- NULL β No match, or an error π so either it's not there, or something went sideways
ngl,NULLis doing double duty here β no match and error both land onNULL, so don't go assuming it's always "just not found," bestie. π
π SEE ALSO π
Kernel file ./block/partitions/ldm.c β and the whole friend group, fr fr:
ldm_parse_privhead(9)ldm_parse_tocblock(9)ldm_parse_vmdb(9)ldm_compare_privheads(9)ldm_compare_tocblocks(9)ldm_validate_privheads(9)ldm_validate_tocblocks(9)ldm_validate_vmdb(9)ldm_validate_partition_table(9)ldm_create_data_partitions(9)ldm_relative(9)ldm_get_vnum(9)ldm_get_vstr(9)ldm_parse_cmp3(9)ldm_parse_dgr3(9)ldm_parse_dgr4(9)ldm_parse_dsk3(9)ldm_parse_dsk4(9)ldm_parse_prt3(9)ldm_parse_vol5(9)ldm_parse_vblk(9)ldm_ldmdb_add(9)ldm_frag_add(9)ldm_frag_free(9)ldm_frag_commit(9)ldm_get_vblks(9)ldm_free_vblks(9)ldm_partition(9)
like, that's the entire group chat and every single one of them ate. π₯π
anyway that's the whole page, bestie π§ β this little icon came from the source tree at ./block/partitions and it's stamped October 2026, so go forth and find those disk ids. mwah. πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms