scsi_eh_finish_cmd(9)
β¨ scsi_eh_finish_cmd(9) β Kernel API Manual, bestie edition β¨
okay so picture this: you're deep in the SCSI error handler (eh for short, iykyk), and a command is finally DONE. Like, handled. Finished. This function is the one that catches it on the way out the door and tucks it somewhere safe instead of letting it loose immediately. π
π NAME π
scsi_eh_finish_cmd β handles a cmd that eh is finished with. that's it, that's the vibe. π¦
πΈ SYNOPSIS πΈ
void scsi_eh_finish_cmd (struct scsi_cmnd *scmd , struct list_head
*done_q );
literally just two params and a dream π
π§ ARGUMENTS π§
scmdβ the original SCSI cmd that eh has finished. main character energy, honestly β this is the command that just went through it all. π₯done_qβ the queue for processed commands. this is where finished cmds get to chill until it's safe to actually complete them. π
π NOTES π
okay so the big brain part: we do not want to use the normal command completion while we're still handling errors. like, absolutely not. π why? because normal completion might cause other commands to get queued, and that would disturb what we're doing β and we are very busy doing error handling, thank you. π
so instead we really want to keep a list of pending commands for final completion. stack 'em up, keep 'em cozy, and then once we're ready to leave error handling we handle completion for real. periodt. β¨
ngl this is a "trust the process" situation β the queue exists so nothing chaotic happens mid-error-recovery. respect the queue. π«Ά
π¦ SEE ALSO π¦
kernel file ./drivers/scsi/scsi_error.c β that's the neighborhood, bestie π‘
scsi_schedule_eh(9)scmd_eh_abort_handler(9)scsi_abort_command(9)scsi_eh_reset(9)scsi_eh_scmd_add(9)scsi_timeout(9)scsi_block_when_processing_errors(9)scsi_eh_prt_fail_stats(9)scsi_report_sense(9)scsi_check_sense(9)scsi_eh_completed_normally(9)scsi_eh_done(9)scsi_try_host_reset(9)scsi_try_bus_reset(9)scsi_try_target_reset(9)scsi_try_bus_device_reset(9)scsi_try_to_abort_cmd(9)scsi_eh_prep_cmnd(9)scsi_eh_restore_cmnd(9)scsi_send_eh_cmnd(9)scsi_request_sense(9)scsi_eh_get_sense(9)scsi_eh_tur(9)scsi_eh_test_devices(9)scsi_eh_try_stu(9)scsi_eh_bus_device_reset(9)scsi_eh_target_reset(9)scsi_eh_bus_reset(9)scsi_eh_host_reset(9)scsi_eh_offline_sdevs(9)scsi_noretry_cmd(9)scsi_decide_disposition(9)scsi_eh_lock_door(9)scsi_restart_operations(9)scsi_eh_ready_devs(9)scsi_eh_flush_done_q(9)scsi_unjam_host(9)scsi_error_handler(9)scsi_report_bus_reset(9)scsi_report_device_reset(9)scsi_ioctl_reset(9)scsi_get_sense_info_fld(9)
and that's the whole page, bestie β go forth and finish those cmds responsibly π
sign-off szn: this lil masterpiece lives under ./drivers/scsi, dated October 2026, in the Kernel API Manual. 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