torture_peb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… torture_peb(9) β€” Kernel API Manual ✨

Okay bestie, welcome to the torture_peb page. This is the Kernel API Manual, and we’re about to vibe-check a physical eraseblock that is supposedly bad. No cap. 🫢


🌸 NAME 🌸

torture_peb β€” test a supposedly bad physical eraseblock.


✨ SYNOPSIS ✨

int torture_peb (struct ubi_device *ubi , int pnum );

πŸŽ€ ARGUMENTS πŸŽ€

  • ubi β€” UBI device description object. It’s giving β€œthe whole device situation.” πŸ’–
  • pnum β€” the physical eraseblock number to test. Literally the PEB number we’re putting under the microscope. πŸ”

πŸ’… DESCRIPTION πŸ’…

So here’s the tea: this function returns -EIO if the physical eraseblock did not pass the test. 😭

If the test was successfully passed, it returns a positive number of erase operations done. Slay. ✨

And in case of other errors, it returns other negative error codes. Periodt. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/mtd/ubi/io.c and all these iconic little functions:


Cute lil sign-off: this page’s source/version is ./drivers/mtd/ubi, and the date on it is October 2026. πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from