nvdimm_badblocks_populate(9)
π 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β thebadblocksinstance 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 π
- Kernel file
./drivers/nvdimm/badrange.c __add_badblock_range(9)
π 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms