scsi_io_completion(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌈 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 from READ(10) to READ(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_request with blk_stat other than BLK_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:


🫢 source/version: ./drivers/scsi Β· October 2026 Β· xoxo, your Unix bestie πŸ’…

πŸ“¦ where this page comes from