ata_build_rw_tf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ata_build_rw_tf(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, we're in the Kernel API Manual today and the main character is ata_build_rw_tf β€” and yes she does exactly what her name says: she builds the ATA taskfile for whatever read/write request you hand her. let's get into it ✨


✨ SYNOPSIS ✨

int ata_build_rw_tf (struct ata_queued_cmd *qc , u64 block , u32 n_block , unsigned int tf_flags , int cdl , int class );

🌸 ARGUMENTS 🌸

  • qc β€” the metadata that's attached to the taskfile you're building, iykyk 🫢
  • block β€” the block address, like where are we even going
  • n_block β€” how many blocks we're talking about
  • tf_flags β€” the read/write + FUA etc. flags, literally the whole vibe of the request
  • cdl β€” the command duration limit index
  • class β€” the IO priority class, so she knows how important this is

πŸ‘‘ DESCRIPTION πŸ‘‘

LOCKING: None. no cap, no locks, we move free πŸ’…

So what she does: she builds the ATA taskfile for the command qc for a read/write request β€” and that request is described by block, n_block, tf_flags and class. that's the whole gig. iconic.

And the returns, since you will ask:

  • 0 on success πŸŽ‰ (we love a clean win)
  • -ERANGE if the request is too large for dev β€” like babe, that's not fitting 😭
  • -EINVAL if the request is just invalid β€” genuinely not it, try again

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/ata/libata-core.c β€” and honestly bestie, the related-reading list is giving entire semester syllabus, so buckle up 🧚:


πŸ’€ real talk though: LOCKING: None. means nobody's holding anything for you β€” that's the documented behaviour, so don't go assuming otherwise, bestie.

and that's the whole page, periodt. this one came out of the ./drivers/ata source, dated October 2026, and she's filed under the Kernel API Manual β€” go off, queen πŸ‘‘πŸ’–

πŸ“¦ where this page comes from