ldm_partition(9)
π ldm_partition(9) π
hey bestie, welcome to ldm_partition(9) β straight from the Kernel API Manual. This one is literally the dynamic-disk detector/handler, and it's giving βI will check the device and then handle the partitionsβ energy. π«Ά
β¨ NAME β¨
ldm_partition β find out whether a device is a dynamic disk and handle it. okay so that's the whole assignment, and the function is doing it. π
π SYNOPSIS π
int ldm_partition (struct parsed_partitions *state );
πΈ ARGUMENTS πΈ
stateβ the partition check state, including the device holding the LDM Database. bestie, this is where the LDM Database info lives. ποΈ
π¦ DESCRIPTION π¦
So this determines whether the device bdev is a dynamic disk. If it is, it creates the partitions necessary in the gendisk structure pointed to by hd. no cap, that's the whole flow. β¨
It creates a dummy device 1, which contains the LDM database, and then it creates each partition described by the LDM database in sequence as devices 2+. For example, if the device is hda, we would have: hda1: LDM database, hda2, hda3, and so on: the actual data containing partitions. the way that numbering stacks up is honestly kind of iconic. π
π₯ RETURN π₯
Here's the return-value vibe check, bestie:
1β Success,state->diskis a dynamic disk and we handled it. slay. π0β Success,state->diskis not a dynamic disk. okay, no dynamic-disk situation here. π«Ά-1β An error occurred before enough information had been read Orstate->diskis a dynamic disk, but it may be corrupted. not the cute outcome, ngl. π
π SEE ALSO π
Kernel file ./block/partitions/ldm.c β and bestie, the whole LDM function family is right here, iykyk:
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_get_disk_objid(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)
Source/version ./block/partitions β’ dated October 2026 β’ ldm_partition(9) is out, 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