STRUCT BBM_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct bbm_info(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so you're reading struct bbm_info(9) from the Kernel API Manual and honestly? iconic of you. this is the [GENERIC] Bad Block Table data structure and it's giving main character energy in the MTD world ✨


🌸 NAME 🌸

struct bbm_info β€” the [GENERIC] Bad Block Table data structure, no cap πŸ’–


✨ SYNOPSIS ✨

struct bbm_info {
    int bbt_erase_shift;
    int options;
    uint8_t *bbt;
    int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
    struct nand_bbt_descr *badblock_pattern;
    void *priv;
 };

like, look at her. six members. all business. 🫢


πŸ¦‹ Members πŸ¦‹

  • bbt_erase_shift β€” [INTERN] the number of address bits in a bbt entry. yes bestie, intern as in internal, not an intern at the office 😭
  • options β€” the options for this descriptor. literally what it says πŸ’…
  • bbt β€” [INTERN] the bad block table pointer. she points at the table, that's her whole job πŸŽ€
  • isbad_bbt β€” the function to determine if a block is bad. vibe check, but for blocks πŸ”₯
  • badblock_pattern β€” [REPLACEABLE] the bad block scan pattern used for initial bad block scan. yes you can swap her out, she's flexible like that πŸ¦‹
  • priv β€” [OPTIONAL] pointer to private bbm date. optional!! lowkey mysterious!! πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./include/linux/mtd/bbm.h
  • struct nand_bbt_descr(9)

go read those too, iykyk πŸ“š


ngl bestie, keep the tags straight β€” [INTERN] means internal, [REPLACEABLE] means you can replace it, and [OPTIONAL] means it might just not be there. don't come for me if you mix them up πŸ’€

and that's the whole page!! mwah πŸ’‹ this little gem lives in ./include/linux/mtd, it's dated October 2026, and the whole thing is filed under struct bbm_info(9) β€” periodt. πŸ§šβ€β™€οΈβ­πŸ“

πŸ“¦ where this page comes from