scsi_io_completion(9)
π scsi_io_completion(9) π
β¨ NAME β¨
okay bestie, welcome to the Kernel API Manual page for scsi_io_completion β literally completion processing for SCSI commands. thatβs the whole vibe. π
π SYNOPSIS π
void scsi_io_completion (struct scsi_cmnd *cmd , unsigned int good_bytes
);
π ARGUMENTS π
cmdβ the command that is finished. yep, the finished one, bestie.good_bytesβ number of processed bytes. thatβs how many bytes got processed. β¨
πΈ DESCRIPTION πΈ
okay so hereβs the plan: we will finish off the specified number of sectors. if we are done, the command block will be released and the queue function will be goosed. yes, goosed. thatβs the actual energy. π«Ά
if we are not done, then we have to figure out what to do next:
- a) We can call
scsi_mq_requeue_cmd. The request will be unprepared and put back on the queue. Then a new command will be created for it. This should be used if we made forward progress, or if we want to switch fromREAD(10)toREAD(6)for example. - b) We can call
scsi_io_completion_action. The request will be put back on the queue and retried using the same command as before, possibly after a delay. - c) We can call
scsi_end_requestwithblk_statother thanBLK_STS_OK, to fail the remainder of the request.
π¦ SEE ALSO π¦
Kernel file: ./drivers/scsi/scsi_lib.c
the whole squad, in order, no cap:
__scsi_queue_insert(9)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_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)
π«Ά source/version: ./drivers/scsi Β· October 2026 Β· xoxo, your Unix bestie π
π¦ 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