STRUCT UBI_MAP_REQ(9)
β¨ struct ubi_map_req(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's a lil struct from the UBI world and it is literally the glow-up you need for map LEB requests. it's giving "small but mighty" π§
πΈ NAME πΈ
struct ubi_map_req β a data structure used in map LEB requests π
like, that's the whole vibe. it's a request struct. for mapping. iconic behavior only π
π¦ SYNOPSIS π¦
struct ubi_map_req {
__s32 lnum;
__s8 dtype;
__s8 padding[3];
};
yes that's the whole thing, she's compact and she knows it π copy it exactly, no cap, the types are __s32 and __s8 and those little underscores are not decorative, they are the moment β¨
π Members π
okay bestie let's meet the cast π«Ά
lnumβ the logical eraseblock number to unmap. that's the actual subject of the request, the main character, the reason we're all here π₯dtypeβ pass "3" for better compatibility with old kernels. yep, just the character3, as a string in the docs, don't overthink it, just do it for the old-kernel girlies πpaddingβ reserved for future, not used, has to be zeroed. like, reserved. for future. not used. and it has to be zeroed β that's not a suggestion, that's a rule, do not leave garbage in there π
π SEE ALSO π
Kernel file ./include/uapi/mtd/ubi-user.h β that's where the source of truth lives, go read her π
struct ubi_attach_req(9)struct ubi_mkvol_req(9)struct ubi_rsvol_req(9)struct ubi_rnvol_req(9)struct ubi_ecinfo_req(9)struct ubi_leb_change_req(9)struct ubi_set_vol_prop_req(9)struct ubi_blkcreate_req(9)
the whole friend group fr fr π«Ά they all hang out together, go say hi π
ok real talk for a sec: padding is reserved for future, not used, and has to be zeroed. don't be the one who leaves it uninitialized and then wonders why things get weird π
and that's the page bestie!! π brought to you by ./include/uapi/mtd, dated October 2026, all about struct ubi_map_req(9) β slay, go map some LEBs 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