read_bbt(9)
π read_bbt β yes bestie, it's a whole kernel function
So this is a page from the Kernel API Manual, and the function we're simping over today is read_bbt. Strap in, it's giving "low-level NAND vibes" and honestly? We're obsessed. πΈ
β¨ NAME β¨
read_bbt β [GENERIC] read the bad block table, starting from a page. That's it, that's the whole gig. π
π SYNOPSIS π
int read_bbt (struct nand_chip *this , uint8_t *buf , int page , int num
, struct nand_bbt_descr *td , int offs );
Like, look at that signature. Six whole arguments. Main character energy fr fr. β¨
π¦ ARGUMENTS π¦
thisβ the NAND chip object. Yeah, it's literally calledthis. Iconic naming choice, no notes. πbufβ a temporary buffer. It's just passing through, doing its little job. π«Άpageβ the starting page. Where the reading begins, bestie. πnumβ how many bbt descriptors to read. Count carefully, ngl. π’tdβ the bbt describtion table. (Yes we're spelling it like that, it's canon.) πoffsβ block number offset in the table. Offset queen. π
π DESCRIPTION π
Read the bad block table starting from page. π
That's genuinely the whole description. Short king of a description. It ate and left no crumbs, but also left no extra details, so don't go looking for lore that isn't there. π
Lowkey important: this reads the bad block table starting from page β that's the starting point, not some random spot. No cap. π₯
π SEE ALSO π
Everything here lives in the kernel file ./drivers/mtd/nand/raw/nand_bbt.c β and the friend group is huge. Miss nothing: π
check_pattern(9)check_short_pattern(9)add_marker_len(9)read_abs_bbt(9)scan_read_oob(9)read_abs_bbts(9)create_bbt(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)
Twenty-two entries. Twenty-two!! The way this function has more connections than a group chat on a Friday night. π§
Byeee bestie β this one's filed under ./drivers/mtd/nand/raw, dated October 2026, page read_bbt(9). Go read a bad block table for me, 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