blk_add_driver_data(9)
π blk_add_driver_data(9) π
okay so bestie, welcome to the kernel API manual β this one lives in the <pink>Kernel API Manual</pink> section and it's literally all about slipping your own custom binary data into the block trace stream. no cap, it's a whole vibe.
β¨ NAME β¨
blk_add_driver_data β add a binary message carrying driver-specific data π
β¨ SYNOPSIS β¨
void blk_add_driver_data (struct request *rq , void *data , size_t len );
that's the whole signature, bestie β no return value, it's giving void main character energy π
β¨ ARGUMENTS β¨
rqβ the io request π¦ (yep, the request struct, the one and only)dataβ the driver-specific data πΈ (whatever blob you wanna send)lenβ the length of that driver-specific data β (size_t, so, like, byte counts)
β¨ DESCRIPTION β¨
so like β some drivers might want to write driver-specific data, per request. that's it, that's the whole point π«Ά. this function is literally the doorway for that. it's giving "custom payload, but make it traceable" π
ngl, that's the entire description in the original too β it's a short one, so enjoy the chill.
β¨ SEE ALSO β¨
the kernel file ./kernel/trace/blktrace.c is where this all goes down, and here's the friend group π
blk_trace_ioctl(9)blk_trace_shutdown(9)blk_add_trace_rq(9)blk_add_trace_bio(9)blk_add_trace_bio_remap(9)blk_add_trace_rq_remap(9)blk_fill_rwbs(9)
all of them are lowkey iconic in their own right, go read 'em π
sign-off time, bestie π§: this page comes from the ./kernel/trace source, from the <lavender>October 2026</lavender> drop, and it's blk_add_driver_data(9) forever and always β¨ periodt π
π¦ 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