STRUCT UBI_SGL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct ubi_sgl(9) ✨

okay bestie, this one's from the Kernel API Manual, and it's literally the glow-up wrapper your scatter list has been waiting for πŸ’…


🌸 NAME 🌸

struct ubi_sgl β€” the UBI scatter gather list data structure, and yes she has a whole personality πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ubi_sgl {
    int list_pos;
    int page_pos;
    struct scatterlist sg[UBI_MAX_SG_COUNT];
 };

like, that's the whole vibe. three members. no notes. πŸ‘‘


πŸ’– Members πŸ’–

  • list_pos β€” your current position in sg[] πŸ“ think of it as the little "you are here" dot on the mall map
  • page_pos β€” your current position in sg[list_pos] 🎯 yeah, it's a whole second layer of "where am I", she contains multitudes
  • sg β€” the scatter gather list itself, the main character, the actual goods 🌟

🌈 Description 🌈

so ubi_sgl is a cute little wrapper around a scatter list, and what it does is keep track of where you are β€” both the current position in the list (list_pos) and the current list item (page_pos) 🫢

and the reason it does that? so it can be used across multiple ubi_leb_read_sg calls ✨ like, it remembers where it left off between calls so you don't have to. it's giving personal assistant energy, honestly. no cap. πŸ’€


πŸ“ SEE ALSO πŸ“

  • Kernel file ./include/linux/mtd/ubi.h πŸ“„
  • struct ubi_volume_info(9)
  • ubi_sgl_init(9)
  • struct ubi_device_info(9)

basically the whole friend group, go say hi πŸ‘‹


fr fr go read ubi_sgl_init(9) before you start poking at the fields manually, iykyk πŸ™ˆ

and that's the page!! she lives in ./include/linux/mtd, dated October 2026, and honestly? iconic. slay. periodt. πŸ§šπŸ’œπŸŒΈ

πŸ“¦ where this page comes from