ata_read_log_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ ata_read_log_page(9) πŸ¦‹

okay so bestie, this one lives in the Kernel API Manual and it's literally the glow-up era of ATA log reading. no cap, it's a whole vibe.


✨ NAME ✨

ata_read_log_page β€” read a specific log page πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

unsigned int ata_read_log_page (struct ata_device *dev , u8 log , u8
       page , void *buf , unsigned int sectors );

like, that's the whole signature. she's giving function prototype realness 🫢


🌸 ARGUMENTS 🌸

  • dev β€” the target device πŸ‘‘ like, this is whose log we're reading, okay? main character device energy.
  • log β€” the log to read πŸ“–
  • page β€” the page to read πŸ”–
  • buf β€” the buffer where the read page goes 🧺 catch it bestie
  • sectors β€” how many sectors to read πŸ”’

πŸ’– DESCRIPTION πŸ’–

okay so it reads the log page using the READ_LOG_EXT command. that's it, that's the flex. iconic behavior honestly ✨

LOCKING: Kernel thread context (may sleep). so like... she can nap. do not come for her in interrupt context, it's giving "do not perceive me" 😭


⭐ RETURN ⭐

0 on success πŸŽ‰ β€” and otherwise an AC_ERR_* mask πŸ’€ (so like, if it's not zero, go check your error bits, iykyk).


🌈 SEE ALSO 🌈

Kernel file ./drivers/ata/libata-core.c β€” and literally the entire ata extended family, no fr fr, here's the whole group chat πŸ’œ


and that's the whole thing bestie, go read some log pages πŸ’…βœ¨

ngl this whole page ships out of ./drivers/ata, dated October 2026 β€” slay, see you in the next kernel release πŸŽ€πŸ¦‹πŸ“
πŸ“¦ where this page comes from