make_partition(9)
π make_partition(9) β the "carve me a partition" era π
okay so bestie, welcome to make_partition(9), a kernel API page from the make_partition manual. this one's short and sweet and honestly kind of iconic β it's the function that slices a brand-new partition off either the front or the back of whatever unused space is chillin' in a layout. let's get into it β¨
β¨ NAME β¨
make_partition β create a new partition from the beginning or the end of the unused space in a layout. that's it, that's the whole vibe π¦
β¨ SYNOPSIS β¨
int make_partition (struct layout *layout , enum partition_id id ,
block_count_t size , bool beginning );
look at her. three params plus the layout, returns an int, no cap she's efficient π
β¨ ARGUMENTS β¨
layoutβ the layout. the actual layout struct you're operating on. she's the main character here, everything happens inside her π«Άidβ the id of the partition to make, as anenum partition_id. you gotta tell it which partition you're bringing into existence.sizeβ the number of blocks to carve out. and here's the cute little detail: if this is0, all the remaining space gets used. zero means "give me the whole rest of the snack drawer" πbeginningβ abool.trueif the partition should start at the beginning of the unused space. like, are we taking from the front of the shelf or the back? that's the question π
β¨ RETURN β¨
a success or error code comes back at you β and specifically, VDO_NO_SPACE if there are fewer than size blocks remaining π like bestie there is simply not enough room, the shelf is full, go home.
β¨ SEE ALSO β¨
the group chat is huge and we love every single member. also side note: kernel file ./drivers/md/dm-vdo/encodings.c β¨
validate_version(9)vdo_validate_header(9)decode_volume_geometry(9)vdo_encode_volume_geometry(9)vdo_parse_geometry_block(9)vdo_compute_new_forest_pages(9)encode_recovery_journal_state_7_0(9)decode_recovery_journal_state_7_0(9)vdo_get_journal_operation_name(9)encode_slab_depot_state_2_0(9)decode_slab_depot_state_2_0(9)vdo_configure_slab_depot(9)vdo_configure_slab(9)vdo_decode_slab_journal_entry(9)allocate_partition(9)vdo_initialize_layout(9)vdo_uninitialize_layout(9)vdo_get_partition(9)vdo_get_known_partition(9)pack_vdo_config(9)pack_vdo_component(9)unpack_vdo_config(9)unpack_vdo_component_41_0(9)decode_vdo_component(9)vdo_validate_config(9)vdo_destroy_component_states(9)decode_components(9)vdo_decode_component_states(9)vdo_validate_component_states(9)vdo_encode_component_states(9)vdo_encode_super_block(9)vdo_decode_super_block(9)vdo_initialize_component_states(9)vdo_compute_index_blocks(9)vdo_initialize_volume_geometry(9)
fr fr read the whole list, they're all connected and they all ate π₯
okay that's the page!! mwah π this came out of ./drivers/md/dm-vdo, dated October 2026 β so go forth bestie, carve those partitions, and remember: size of 0 means all of it ππβ
π¦ 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