search_bbt(9)
π search_bbt(9) π
okay so welcome to the Kernel API Manual, bestie β today's main character is search_bbt(9), and it is lowkey iconic. it does a [GENERIC] scan of the device for a specific bad block table, and yes that is exactly as important as it sounds. π¦β¨
πΈ NAME πΈ
search_bbt β [GENERIC] scan the device for a specific bad block table. no cap, that's the whole assignment. π
π SYNOPSIS π
int search_bbt (struct nand_chip *this , uint8_t *buf , struct
nand_bbt_descr *td );
π ARGUMENTS π
thisβ NAND chip object. the whole chip vibe. πbufβ temporary buffer. think of it as the little tray you carry stuff around on. πtdβ descriptor for the bad block table. the blueprint, the map, the moment. πΊοΈ
π¦ DESCRIPTION π¦
okay so here's the tea: search_bbt() reads the bad block table by searching for a given ident pattern. the search is performed either from the beginning up or from the end of the device downwards β choose your adventure, bestie. the search starts always at the start of a block. that part is not negotiable. π
if the NAND_BBT_PERCHIP option is given, each chip is searched for a bbt, and that bbt contains the bad block information of this chip. this is necessary to provide support for certain DOC devices. so yeah, it's giving "per-chip main character energy" and it's doing it for a reason. ππ₯
the bbt ident pattern resides in the oob area of the first page in a block. that's where the pattern lives. that's its home. π β¨
π SEE ALSO π
the kernel file is literally ./drivers/mtd/nand/raw/nand_bbt.c β yes bestie, that's the source file β and the whole friend group is:
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)create_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)
sign-off π« this page comes from the ./drivers/mtd/nand/raw source/version and is dated October 2026, and search_bbt(9) ate and left no crumbs. 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