STRUCT NAND_PAGE_IO_REQ(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct nand_page_io_req β€” the NAND I/O request object πŸ’…

okay so bestie, welcome to the Kernel API Manual, we're talking about struct nand_page_io_req today and it's genuinely iconic β€” it's the little bundle of info that carries one single page I/O request down into the NAND sub-layers. πŸŽ€


🌸 SYNOPSIS 🌸

       struct nand_page_io_req {
           enum nand_page_io_req_type type;
           struct nand_pos pos;
           unsigned int dataoffs;
           unsigned int datalen;
           union {
             const void *out;
             void *in;
           } databuf;
           unsigned int ooboffs;
           unsigned int ooblen;
           union {
             const void *out;
             void *in;
           } oobbuf;
           int mode;
           bool continuous;
        };

no cap, that's the whole vibe. now let's meet the members one by one 🫢


πŸ’– MEMBERS πŸ’–

  • type β€” the type of page I/O, like… are we reading or writing? that's literally it, that's the whole personality 🌈
  • pos β€” the position this I/O request is targeting πŸ’«
  • dataoffs β€” the offset within the page ⭐
  • datalen β€” number of data bytes to read from/write to this page πŸ”₯
  • databuf β€” buffer to store data in or get data from, depending on which way the vibes flow πŸ™ˆ
  • ooboffs β€” the OOB offset within the page πŸ¦‹
  • ooblen β€” the number of OOB bytes to read from/write to this page 🌸
  • oobbuf β€” buffer to store OOB data in or get OOB data from πŸ’œ
  • mode β€” one of the MTD_OPS_XXX mode πŸŽ€
  • continuous β€” no need to start over the operation at the end of each page, the NAND device will automatically prepare the next one πŸ‘‘ (this one is lowkey main character energy, it just keeps going)

πŸ¦‹ DESCRIPTION πŸ¦‹

So this object is what you use to pass per-page I/O requests to the NAND sub-layers. ✨

The way that works is kind of genius actually: all the useful information is already formatted in a useful way, so specific NAND layers can just focus on translating that info into specific commands/operations instead of doing a whole scavenger hunt. ate and left no crumbs. πŸ’…


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/linux/mtd/nand.h struct, plus literally the entire friend group:


okay that's the whole page bestie, ily, go read some NAND headers πŸ’–

this lil manifesto lives in ./include/linux/mtd and it's dated October 2026 β€” so yeah, mark your calendars, the future is now, periodt. πŸ§šβ€β™€οΈβ­πŸ‘‘

πŸ“¦ where this page comes from