blk_add_driver_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ‘‘

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