blk_add_trace_rq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… blk_add_trace_rq β€” the Kernel API Manual, but make it make sense

okay bestie, so we're in the Kernel API Manual today and the star of the show is blk_add_trace_rq. it's giving lowkey iconic tracing energy, and honestly? you're gonna slay this one 🫢


✨ NAME ✨

blk_add_trace_rq β€” literally adds a trace for a request-oriented action. that's it, that's the vibe πŸ’–


🌸 SYNOPSIS 🌸

void blk_add_trace_rq (struct request *rq , blk_status_t error ,
unsigned int nr_bytes , u64 what , u64 cgid );

no cap, that's the whole signature. five arguments, zero drama ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • rq β€” the source request πŸ‘‘ this is the main character we're tracing
  • error β€” the return status to log πŸ’€ whatever status you're returning, it goes in the record
  • nr_bytes β€” number of completed bytes πŸ“
  • what β€” the action, like, the actual thing that happened ✨
  • cgid β€” the cgroup info 🧚

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it actually do?? it records an action against a request πŸ’… and bestie, it will log the bio offset + size. that's the whole bit. no extra lore, no hidden side quest β€” just offset and size, logged, periodt πŸ”₯


🌈 SEE ALSO 🌈

like, go read these too, they're all in the same friend group:

ngl, blktrace.c is the source file for all of this β€” that's where the lore lives πŸ’œ

k bye bestie, this page came from ./kernel/trace and it's dated October 2026 β€” so go forth and trace those requests, you absolute icon πŸŒŸπŸ’…πŸŽ€

πŸ“¦ where this page comes from