scan_read_oob(9)
β¨ scan_read_oob(9) β the Kernel API Manual, bestie edition β¨
okay so likeβ¦ welcome to the scan_read_oob page from the Kernel API Manual π. this one's a lil niche but lowkey iconic if you're deep in NAND land. let's go π
πΈ NAME πΈ
scan_read_oob β literally just [GENERIC] Scan data+OOB region to buffer π
that bracket-y [GENERIC] tag? yeah it's part of the name, keep it, it's giving label energy β¨
π¦ SYNOPSIS π¦
int scan_read_oob (struct nand_chip *this , uint8_t *buf , loff_t offs ,
size_t len );
that's the whole flex. returns an int, takes four things, no cap π«Ά
π ARGUMENTS π
okay bestie let's meet the cast π
thisβ the NAND chip object. yes it's literally calledthis. main character energy honestly πbufβ a temporary buffer. it's not forever, it's just for now πoffsβ the offset at which to scan πlenβ length of the data region to read π
π DESCRIPTION π
so what does it actually do? it does a scan read of data out of data+OOB. π
and here's the cute part: it may traverse multiple pages, interleaving page,OOB,page,OOB,... in buf. like it's literally layering them in there, alternating, one after another, iykyk β¨
it completes the transfer and returns the "strongest" ECC condition β that's either an error or a bitflip, whichever's the most dramatic π
β οΈ heads up: it may quit on the first (non-ECC) error. so like, it's not gonna sit there and power through everything, it bails early fr fr π
π SEE ALSO π
all the sibling functions live in the kernel file ./drivers/mtd/nand/raw/nand_bbt.c β go say hi to the whole friend group π«Ά
check_pattern(9)check_short_pattern(9)add_marker_len(9)read_bbt(9)read_abs_bbt(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)
and that's the page, bestie π§β¨ this one ships from ./drivers/mtd/nand/raw and it's dated October 2026 β so yeah, timestamped and slaying π
π 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