create_bbt(9)
π create_bbt β the Kernel API Manual page, but make it cute β¨
okay so this is create_bbt(9) from the Kernel API Manual and honestly? it's a baddie little function. let's get into it π
πΈ NAME
create_bbt β [GENERIC] create a bad block table by scanning the device. that's it. that's the whole vibe. it scans, it tables, it slays π
β¨ SYNOPSIS
int create_bbt (struct nand_chip *this , uint8_t *buf , struct
nand_bbt_descr *bd , int chip );
like yes, it returns an int, and yes, those spaces before the commas are just how the manpage formatted it β we don't touch the code, bestie, not ever π
π¦ ARGUMENTS
thisβ the NAND chip object itself, the main character of this whole operation πbufβ a temporary buffer. it's giving "grab a scratchpad, we're working" energy πbdβ the descriptor for the good/bad block search pattern, aka the little instruction sheet for what counts as bad. iykyk πchipβ create the table for a specific chip, or-1to read all chips. heads up though: this only applies if theNAND_BBT_PERCHIPoption is set. no option, no per-chip life, fr fr π
π DESCRIPTION
so what it does is: create a bad block table by scanning the device for the given good/bad block identify pattern. that's literally the whole thing. it scans, it finds the pattern, it builds the table. iconic behaviour, no notes πβ
π₯ SEE ALSO
kernel file ./drivers/mtd/nand/raw/nand_bbt.c β and honestly the whole friend group came through for this one, so let's give them their flowers π:
check_pattern(9), check_short_pattern(9), add_marker_len(9), read_bbt(9), read_abs_bbt(9), scan_read_oob(9), read_abs_bbts(9), search_bbt(9), search_read_bbts(9), get_bbt_block(9), mark_bbt_block_bad(9), write_bbt(9), nand_memory_bbt(9), check_create(9), nand_update_bbt(9), mark_bbt_region(9), verify_bbt_descr(9), nand_scan_bbt(9), nand_create_badblock_pattern(9), nand_create_bbt(9), nand_isreserved_bbt(9), nand_isbad_bbt(9), nand_markbad_bbt(9)
like, genuinely the whole squad. obsessed π«Ά
and that's the page!! this little gem lives in ./drivers/mtd/nand/raw, dated October 2026, and it's filed under create_bbt(9) in the Kernel API Manual. go forth and scan those bad blocks, bestie β periodt πβ¨
π¦ 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