ubi_create_volume(9)
β¨ ubi_create_volume π
okay so bestie, welcome to ubi_create_volume(9) from the Kernel API Manual β like, the kernel's own group chat for making volumes. let's get into it π
πΈ NAME πΈ
ubi_create_volume β create volume. that's it, that's the vibe β¨
π¦ SYNOPSIS π¦
int ubi_create_volume (struct ubi_device *ubi , struct ubi_mkvol_req
*req );
π ARGUMENTS π
ubiβ the UBI device description object, aka the whole device's main character energy πreqβ the volume creation request, like the lil form you gotta fill out to ask for a new volume π
π₯ DESCRIPTION π₯
so this function creates the volume that's described by req. literally what it says on the tin π
here's the tea: if req->vol_id is UBI_VOL_NUM_AUTO, this function will automatically assign an ID to the new volume and save it right back into req->vol_id. so you don't gotta pick a number yourself, it handles that for you, slay π
it returns zero in case of success and a negative error code in case of failure β so zero is the good ending, negative means something went sideways π
β οΈ important caveat, no cap: the caller has to have the ubi->device_mutex locked. like, that's not optional, bestie. lock it before you call this or it's giving undefined chaos π
π SEE ALSO π
kernel file ./drivers/mtd/ubi/vmt.c, plus these iconic neighbours:
ubi_remove_volume(9)ubi_resize_volume(9)ubi_rename_volumes(9)ubi_add_volume(9)ubi_free_volume(9)self_check_volume(9)self_check_volumes(9)
and that's the whole page, periodt π«Ά this one came from ./drivers/mtd/ubi, dated October 2026 β ty for coming to my ted talk, 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