STRUCT MTD_PAIRING_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mtd_pairing_info(9)

okay so this is straight out of the Kernel API Manual and it's giving "tiny struct, big lore" energy β€” it's literally just two ints but they explain how NAND pages share a cell πŸ¦‹ let's get into it bestie


✨ NAME ✨

struct mtd_pairing_info β€” page pairing information πŸŽ€


✨ SYNOPSIS ✨

struct mtd_pairing_info {
    int pair;
    int group;
 };

that's it. that's the whole struct. two members, zero drama, maximum relevance πŸ’œ


✨ Members ✨

  • pair β€” the pair id πŸ”₯
  • group β€” the group id 🌸

✨ Description ✨

okay so real talk: the term "pair" is used here, even though TLC NANDs might group pages by 3 (that's 3 bits in a single cell, no cap). A pair should regroup all the pages that are sharing the same cell. Then pairs get indexed in ascending order, periodt. πŸ‘‘

group is defining the position of a page in a given pair. You can also think of it as the bit position in the cell β€” like, page attached to bit 0 belongs to group 0, page attached to bit 1 belongs to group 1, etc. it's giving "everybody has a seat at the cell table" 🫢


✨ Example ✨

the H27UCG8T2BTR-BC datasheet describes the following pairing scheme:

group-0         group-1

pair-0      page-0          page-4 pair-1      page-1          page-5
pair-2      page-2          page-8 ...  pair-127    page-251
page-255
bestie note: the "group" and "pair" terms were extracted from Samsung and Hynix datasheets, and might be referenced under other names in other datasheets β€” Micron is describing this concept as "shared pages" πŸ‘€ so if you're reading a different datasheet and nothing matches, that's why, iykyk 😭

✨ SEE ALSO ✨

  • Kernel file ./include/linux/mtd/mtd.h
  • struct mtd_oob_ops(9)
  • struct mtd_oob_region(9)
  • struct mtd_pairing_scheme(9)
  • struct mtd_debug_info(9)
  • struct mtd_part(9)
  • struct mtd_master(9)
  • mtd_align_erase_req(9)

and that's the whole page, bestie πŸ’– this one came from ./include/linux/mtd and it's dated October 2026 β€” go forth and pair your pages responsibly, mwah πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from