sd_eh_action(9)
π sd_eh_action(9) β like, the error handling callback, bestie
Ok so real talk, this one's from the Kernel API Manual (sd_eh_action, section 9) and it's genuinely one of those tiny-but-iconic functions. Let's get into it π
β¨ NAME β¨
sd_eh_action β the error handling callback. That's it, that's the whole vibe. She's the one who picks up the phone when a command fails π
πΈ SYNOPSIS πΈ
int sd_eh_action (struct scsi_cmnd *scmd , int eh_disp );
Look at her. Two args, one int return. Clean. Minimalist. Main character energy fr fr π
π¦ ARGUMENTS π¦
scmdβ the sd-issued command that has failed. Like, the thing that went πeh_dispβ the recovery disposition that the midlayer suggested. Basically the midlayer's hot take on how to recover π
π DESCRIPTION π
So here's the situation, bestie. This function gets called by the SCSI midlayer upon completion of an error test command (currently TEST UNIT READY β ok noted, that's the one π). The result of sending the eh command gets passed in through eh_disp.
And what are we even looking for? We're hunting for devices that fail medium access commands but are totally OK with non-access commands like test unit ready. Because if that happens, the recovery wrongly sees the device as having a successful recovery β like, no cap, it looks like a slay but it's actually a lie π
So yeah, she's the vibe check for fake-successful recoveries. Periodt. π
π SEE ALSO π
Kernel file ./drivers/scsi/sd.c plus the whole friend group:
sd_group_number(9)sd_open(9)sd_release(9)sd_ioctl(9)sd_check_events(9)sd_eh_reset(9)sd_done(9)sd_read_block_provisioning(9)sd_read_cpr(9)sd_revalidate_disk(9)sd_unlock_native_capacity(9)sd_format_disk_name(9)sd_probe(9)sd_remove(9)init_sd(9)exit_sd(9)
And that's the whole page, gorgeous π«Ά This lil legend lives in ./drivers/scsi and the docs are dated October 2026 β so mark your calendars, 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