__scsi_queue_insert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ __scsi_queue_insert β€” the private queue insertion one

okay so real talk, this page lives in section 9 of the Kernel API Manual (that's the manual name, bestie, jot it down πŸ’…) and it's about one very specific little function. she's not the public-facing one. she's the private one. main character energy but behind the scenes, iykyk ✨


🌸 NAME 🌸

__scsi_queue_insert β€” private queue insertion. that's it, that's the whole name. lowkey iconic how short it is.


πŸŽ€ SYNOPSIS πŸŽ€

void __scsi_queue_insert (struct scsi_cmnd *cmd , enum scsi_qc_status
reason , bool unbusy );

like, yes, that's the whole signature. three args, no returns, void queen πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • cmd β€” the SCSI command that's being requeued. the little guy going back in the queue 🫢
  • reason β€” the reason for the requeue. type is enum scsi_qc_status, so she's got opinions about why πŸ’€
  • unbusy β€” whether the queue should be unbusied. yes that's a real word in this house. bool, so it's a yes/no vibe check πŸ¦‹

✨ DESCRIPTION ✨

okay so listen. this right here is a private queue insertion. private. not public. do not pass go, do not call it from your driver, bestie 😭

the public interface scsi_queue_insert always assumes the queue should be unbusied, because it's always called before the completion. always! every time! no cap! 🌈

this function though? __scsi_queue_insert is for a requeue after completion β€” and fr fr, that should only occur in this file. this file and nowhere else. she stays home πŸ πŸ’œ

bestie warning 🚨: the "should only occur in this file" part is not a suggestion. it's a should only. respect the boundary or the kernel will respectfully end you πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

strap in, this list is long. like, comically long. we're going to the entire SCSI neighbourhood, no skipping, every single one gets their moment πŸ‘‘

kernel file ./drivers/scsi/scsi_lib.c β€” that's the house where all of this lives 🏑

scsi_queue_insert(9), scsi_failures_reset_retries(9), scsi_check_passthrough(9), scsi_execute_cmd(9), scsi_run_queue(9), scsi_result_to_blk_status(9), scsi_rq_err_bytes(9), scsi_io_completion(9), scsi_alloc_sgtables(9), scsi_initialize_rq(9), scsi_alloc_request(9), scsi_dispatch_cmd(9), scsi_get_internal_cmd(9), scsi_put_internal_cmd(9), scsi_device_from_queue(9), scsi_block_requests(9), scsi_unblock_requests(9), scsi_mode_select(9), scsi_mode_sense(9), scsi_test_unit_ready(9), scsi_device_set_state(9), scsi_evt_emit(9), scsi_evt_thread(9), sdev_evt_send(9), sdev_evt_alloc(9), sdev_evt_send_simple(9), scsi_device_quiesce(9), scsi_device_resume(9), scsi_internal_device_block_nowait(9), scsi_device_block(9), scsi_internal_device_unblock_nowait(9), scsi_internal_device_unblock(9), scsi_block_targets(9), scsi_host_block(9), scsi_kmap_atomic_sg(9), scsi_kunmap_atomic_sg(9), scsi_vpd_lun_id(9), scsi_vpd_lun_serial(9), scsi_vpd_tpg_id(9), scsi_build_sense(9)

see? told you. all 40 of them, accounted for, nobody left on read πŸ’…βœ¨


and that's the whole page, bestie! πŸ“ this little slice of kernel lore comes to you from ./drivers/scsi, dated October 2026 β€” she's a Scorpio, probably πŸ¦‚πŸ’œ go forth and requeue responsibly, mwah πŸ˜˜πŸ’–

πŸ“¦ where this page comes from