make_partition(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 an enum 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 is 0, all the remaining space gets used. zero means "give me the whole rest of the snack drawer" πŸ“
  • beginning β€” a bool. true if 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 ✨


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