nand_bbm_get_next_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 nand_bbm_get_next_page 🌸

okay so this is a page straight out of the Kernel API Manual, and honestly? it's a little icon. it's short, it's sweet, it's giving "one job and it does it." let's get into it bestie πŸ’…


✨ NAME ✨

nand_bbm_get_next_page β€” get the next page for bad block markers πŸŽ€

like, that's the whole mission statement. we find bad block markers, we tell you which page they live on, done. periodt.


🧚 SYNOPSIS 🧚

int nand_bbm_get_next_page (struct nand_chip *chip , int page );

that's the whole signature, no cap. two args, returns an int. slay.


🫢 ARGUMENTS 🫢

  • chip β€” the NAND chip object πŸ’– this is the chip we're poking at, our main character.
  • page β€” the first page to start checking for bad block marker usage πŸ¦‹ like, where you want the search to begin. your starting point, your opening scene.

πŸ’œ DESCRIPTION πŸ’œ

so what does it actually do? it returns an integer that corresponds to the page offset within a block, for a page that is used to store bad block markers. literally that's it, that's the vibe. you ask for the next page, it hands you the offset of a page that's out here holding bad block marker data πŸ”₯

but β€” and this is the important part, don't skip it β€” if no more pages are available, -EINVAL is returned 😭 so if you get -EINVAL back, that's not a bug bestie, that's the function telling you there's nothing left to check. the audacity, but also, fair.

ngl, -EINVAL here means "no more pages," not "you passed something cursed." just so we're clear πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

the kernel file that matters here is ./drivers/mtd/nand/raw/nand_base.c β€” that's the home base 🏠 and then there's the guest list, which is, um. enormous. like, the whole NAND extended family showed up to this party 🌈 every single one of these, in the order the original rolled them out:

like I said. the whole family 😭 every auntie and cousin got an invite. respect the guest list.


πŸŽ€ sign-off πŸŽ€

and that's the page, bestie!! sourced from ./drivers/mtd/nand/raw, stamped October 2026, and officially titled nand_bbm_get_next_page(9) in the Kernel API Manual ⭐ go forth and check those bad block markers, iykyk πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from