nvdimm_badblocks_populate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ nvdimm_badblocks_populate(9)

okay so bestie, welcome to the Kernel API Manual β€” this one's a tiny little function in ./drivers/nvdimm and honestly it's giving "small but iconic" πŸŽ€


✨ NAME ✨

nvdimm_badblocks_populate β€” the glow-up where a list of badranges becomes actual badblocks πŸ’…


🌸 SYNOPSIS 🌸

void nvdimm_badblocks_populate (struct nd_region *nd_region , struct
badblocks *bb , const struct range *range );

like, yes, that's the whole signature, no cap 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • nd_region β€” the parent region of the range you're interrogating πŸ‘€ (it's the main character, everything hangs off it)
  • bb β€” the badblocks instance you're populating. this is the one getting filled up, she's literally the canvas πŸ’–
  • range β€” the resource range to consider. the zone you're checking against, iykyk

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea, bestie:

the badrange list that gets generated during bus initialization may contain multiple ranges β€” and yes, they might possibly be overlapping physical address ranges 😭 like nobody said it was gonna be clean.

what this function does: it compares each of those ranges to the resource range that's currently being initialized, and then adds badblocks entries for all the matching sub-ranges. every single match. no skipping, no shortcuts. periodt ✨

it's literally just a conversion moment β€” badranges in, badblocks out 🧚


🌈 SEE ALSO 🌈


πŸ’€ reminder: this whole page is Kernel API Manual territory, so if you're poking at badrange.c without a good reason, bestie, maybe go touch some grass first πŸ™ˆπŸŒ±

okay that's the whole page!! πŸ“ source: ./drivers/nvdimm, dated October 2026, from your favorite Kernel API Manual β€” go forth and populate those badblocks correctly, mwah πŸ’‹πŸ‘‘

πŸ“¦ where this page comes from