scmd_eh_abort_handler(9)
π scmd_eh_abort_handler π
okay so bestie, welcome to the Kernel API Manual, section 9 β this is where we handle command aborts and honestly? it's giving main character energy in the SCSI error handler. let's get into it π
β¨ NAME β¨
scmd_eh_abort_handler β literally the function that handles command aborts. that's it, that's the vibe. π¦
π«Ά SYNOPSIS π«Ά
void scmd_eh_abort_handler (struct work_struct *work );
yes queen, it returns void, we're not about that return-value life here β¨
πΈ ARGUMENTS πΈ
workβ the command to be aborted. like, the actual thing you're cancelling. go off,workπ
π₯ NOTE (read this one fr fr) π₯
okay so this function must be called only for a command that has timed out. no cap. do not come in here with a fresh little command that's doing fine, that's not what we're doing today. π
here's the why, because the why is iconic: because the block layer marks a request as complete before it calls scsi_timeout, a .scsi_done call from the LLD for a command that has timed out do not have any effect. so yeah β that whole callback is just out here having zero impact, living its truth, doing nothing. π
hence it is safe to call scsi_finish_command from this function. π«Ά slay. safe. periodt.
π¦ SEE ALSO π¦
the whole squad, in the kernel file ./drivers/scsi/scsi_error.c β iykyk π
scsi_schedule_eh(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_finish_cmd(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)
okay and that's the whole page bestie, thank you for coming to my ted talk π
brought to you by the fine folks over at ./drivers/scsi β October 2026 edition, straight out of the Kernel API Manual. stay slay, stay patched. πβ¨π
π¦ 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