scsi_change_queue_depth(9)
π scsi_change_queue_depth β NAME β¨
ok so scsi_change_queue_depth β literally change a device's queue depth π
and before you ask, yes bestie, this is from the Kernel API Manual (section 9, kernel developer vibes only, no cap). it's giving "I read the source" energy and honestly? iconic. π
πΈ SYNOPSIS πΈ
int scsi_change_queue_depth (struct scsi_device *sdev , int depth );
like, that's the whole incantation. one function, two args, one int coming back atcha. π¦
β¨ ARGUMENTS β¨
sdevβ the SCSI Device in question π like, the actual device we're doing this to. main character energy fr.depthβ number of commands allowed to be queued to the driver π this is the number. the whole point. the queue-allowed-to-be-queued count, if you will.
π DESCRIPTION π
okay so here's the tea β: scsi_change_queue_depth sets the device queue depth and returns the new value. that's it. that's the function. it does the thing and then it tells you the thing, which is honestly so thoughtful of it π«Ά
so like, you hand it a device (sdev) and a depth (depth), it goes "say less" and updates the queue depth, then comes back with the fresh new value so you're never left guessing. lowkey the most communicative function in the whole file ngl πβ¨
no funny business, no hidden tricks in the docs β literally just "sets the device queue depth and returns the new value." take it at face value bestie, the manpage is being uncharacteristically chill here π
π₯ SEE ALSO π₯
the required reading, aka the group chat you should also be in ππ
all of these live in the kernel file ./drivers/scsi/scsi.c:
scsi_finish_command(9)scsi_track_queue_full(9)scsi_vpd_inquiry(9)scsi_get_vpd_page(9)scsi_get_vpd_buf(9)scsi_attach_vpd(9)scsi_report_opcode(9)scsi_cdl_check(9)scsi_cdl_enable(9)scsi_device_get(9)scsi_device_put(9)starget_for_each_device(9)__starget_for_each_device(9)__scsi_device_lookup_by_target(9)scsi_device_lookup_by_target(9)__scsi_device_lookup(9)scsi_device_lookup(9)
(and yeah, scsi_track_queue_full(9) is right there, so if your queue is full you already know where to go π)
that's the whole page, bestie β go forth and queue responsibly πβ
sign-off time π this little legend lives in ./drivers/scsi, and it's stamped October 2026 β so it's basically from the future, which is very main character of it. mwah ππ
π¦ 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