blk_add_trace_rq(9)
π 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 tracingerrorβ the return status to log π whatever status you're returning, it goes in the recordnr_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:
- Kernel file
./kernel/trace/blktrace.c blk_trace_ioctl(9)blk_trace_shutdown(9)blk_add_trace_bio(9)blk_add_trace_bio_remap(9)blk_add_trace_rq_remap(9)blk_add_driver_data(9)blk_fill_rwbs(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms