STRUCT UBI_MAP_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 character 3, 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