ubi_resize_volume(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ubi_resize_volume(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for ubi_resize_volume β€” yes it's a section 9 page, yes it's iconic, let's get into it πŸŽ€


✨ NAME ✨

ubi_resize_volume β€” re-size volume. that's it. that's the whole vibe. glow-up for your volume, no cap πŸ’–


🌸 SYNOPSIS 🌸

int ubi_resize_volume (struct ubi_volume_desc *desc , int reserved_pebs
);

like literally that's the whole signature. look at her go ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • desc β€” the volume descriptor, i.e. your lil VIP pass to the volume you're about to glow up 🫢
  • reserved_pebs β€” the new size, measured in physical eraseblocks. yes physical eraseblocks. that's the unit. periodt.

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do? ubi_resize_volume re-sizes the volume πŸ’… and then:

  • returns zero on success β€” slay, ate, no notes
  • returns a negative error code if it fails 😭 it's giving "not every resize is a main character"
⚠️ ok important bestie, do NOT skip this: the caller has to have the ubi->device_mutex locked. locked. as in, you gotta hold it before you call this. not optional, not a suggestion, fr fr πŸ”’

🌈 SEE ALSO 🌈

go read the kernel file ./drivers/mtd/ubi/vmt.c (yes, literally that path, iykyk 🧚) and then check out her whole friend group:


πŸ’€ lowkey reminder that this whole page lives in the kernel source tree at ./drivers/mtd/ubi β€” that's the source/version vibe

okay bye bestie, go resize something responsibly, and remember: lock that mutex first πŸ‘‘πŸ’–

✧ο½₯゚: * ubi_resize_volume(9) β€” Kernel API Manual β€” October 2026 * :゚ο½₯✧ πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from