doc_get_erase_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

Welcome to doc_get_erase_count(9), straight from the Kernel API Manual β€” this one gets the block erase count, bestie. It's giving β€œhow many times has this block been erased?” energy. πŸ’…

✨ SYNOPSIS ✨

int doc_get_erase_count (struct docg3 *docg3 , loff_t from );

πŸ’– ARGUMENTS πŸ’–

  • docg3 β€” the device. Like, the literal struct docg3 * you're passing in, no cap. 🫢
  • from β€” the offset in which the block is. This is your β€œwhere does this block even live” coordinate. 🎯

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so doc_get_erase_count gets the number of times a block was erased. The number it returns is the maximum of the erase times between the first plane and the second plane β€” and yeah, those should normally be equal, periodt. πŸ’«

Returns the number of erases, or -EINVAL or -EIO on error. 😭

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./drivers/mtd/devices/docg3.c β€” plus the whole docg3 bestie lineup for section 9, every single one, no skips:


Mwah πŸ’‹ β€” this page's source/version is ./drivers/mtd/devices, dated October 2026, and it's still your girl doc_get_erase_count(9). Bye bestie, go count those erases responsibly! 🫢✨

πŸ“¦ where this page comes from