dm_early_create(9)
π dm_early_create π
ok so bestie, welcome to the dm_early_create(9) page β it's a kernel API manual entry, and honestly? it's giving "niche but iconic." this one lives in the Kernel API Manual and it's all about creating a mapped device in early boot. yes, early early. like, before the party even starts. π
β¨ NAME β¨
dm_early_create β create a mapped device in early boot. that's it, that's the whole vibe. πΈ
β¨ SYNOPSIS β¨
int dm_early_create (struct dm_ioctl *dmi , struct dm_target_spec **spec_array , char **target_params_array );
like, it returns an int, and it takes three things. we're gonna go through them one by one, don't worry. π«Ά
β¨ ARGUMENTS β¨
dmiβ this one holds the main information of the device mapping that's gonna be created. it's the main character of the argument list, lowkey. πspec_arrayβ an array of pointers tostruct dm_target_spec. it describes the mapping table of the device. so like, the blueprint. π¦target_params_arrayβ an array of strings holding the parameters for a specific target. the little details each target needs. β¨
β¨ DESCRIPTION β¨
okay so here's the whole situation. normally (as performed in a normal ioctl), the struct dm_target_spec and the parameters for every target get embedded at the end of struct dm_ioctl. embedded! like they're clingy or something π
this function says "not me doing that" and instead passes them as arguments, so the caller doesn't need to serialize them. slay, honestly. the caller just hands them over and we move on. π
the size of the spec_array and the target_params_array is given by dmi->target_count. that's the number, no cap. so make sure that's set right or it's giving chaos. π₯
and the reason it can be this chill: this function is supposed to be called in early boot, so locking mechanisms to protect against concurrent loads are not required. none. zero. not needed at that stage. periodt. π
ngl this one is specifically an early-boot situation β the "no locking needed" thing is tied to being called that early, so don't go reading it as a free pass for later on, bestie. π
β¨ SEE ALSO β¨
- Kernel file
./drivers/md/dm-ioctl.c dm_copy_name_and_uuid(9)π§
aaaaand that's the page!! this lil beauty comes from ./drivers/md in the kernel tree, dated October 2026, and it's the dm_early_create(9) entry from the Kernel API Manual β mwah, bye bestie, go create some mapped devices responsibly ππβ
π¦ 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