scsi_queue_insert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scsi_queue_insert β€” the Kernel API Manual page, but make it make sense πŸŽ€

okay bestie, so you know how this whole thing lives in scsi_queue_insert(9)? yeah. that's the name. we're in the Kernel API Manual and honestly this one is short and sweet. let's go ✨


🌸 NAME 🌸

scsi_queue_insert β€” literally just reinsert a command in the queue. that's it. that's the whole vibe. putting the thing back. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void scsi_queue_insert (struct scsi_cmnd *cmd , enum scsi_qc_status
reason );

look at her. efficient. no cap. 🫢


πŸ’œ ARGUMENTS πŸ’œ

  • cmd β€” the command that we are adding to queue. she's the main character here, we're putting her back in line πŸ‘‘
  • reason β€” why we are inserting command to queue. like, the why. the lore. the receipts. πŸ”₯

🧚 DESCRIPTION 🧚

so there are exactly two situations where we do this, and you need to know both, ok?

  1. the host is busy and it cannot accept any more commands for the time being β€” she's full. give her a minute. 😭
  2. the device returned QUEUE_FULL and can accept no more commands β€” the device literally said no more, and we respect that. πŸ’€

that's it. those are the two cases. lowkey iconic how simple it is. ⭐


🌈 CONTEXT 🌈

this could be called either from an interrupt context or a normal process context. so like… either one. don't assume. vibe check your context first, bestie. πŸ™ˆ


πŸ’– SEE ALSO πŸ’–

Kernel file ./drivers/scsi/scsi_lib.c β€” go read her, she has the receipts:

__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)

like. that's a whole friend group. go say hi. πŸ«ΆπŸ’…


and that's the whole page, bestie β€” brought to you from ./drivers/scsi, dated October 2026, scsi_queue_insert(9). slay. periodt. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from