sd_remove(9)
π sd_remove(9) β from the Kernel API Manual, bestie
okay so picture this: a scsi disk that sd_probe already vouched for is getting detached from the system, and this is the function that gets the call. it's literally called whenever that happens β and yes, potentially multiple times while the sd module is being unloaded. so it's not a one-and-done situation, she's clocking in for multiple shifts π
β¨ SYNOPSIS β¨
void sd_remove (struct scsi_device *sdp );
π ARGUMENTS π
sdpβ pointer to device object. that's the whole vibe. she needs the device object and nothing else π«Ά
πΈ NOTE πΈ (read this one, fr fr)
so like, the tea is:
- this function is invoked from the scsi mid-level. that's who's calling, no cap.
- this function potentially frees up a device name (e.g.
/dev/sdc) that could be re-used by a subsequentsd_probe. so like, she might hand that name back to the pool and somebody else could snatch it up later π - this function is not called when the built-in sd driver is
"exit-ed". like, that's just not a thing that happens. periodt.
π please note the careful wording β "potentially" frees up a device name, and not called on built-in driver exit. don't come for me, that's what the page says.
π¦ SEE ALSO π¦
Kernel file ./drivers/scsi/sd.c β go read the source, it's giving main character energy β¨
and the whole sd squad, all together:
sd_group_number(9)sd_open(9)sd_release(9)sd_ioctl(9)sd_check_events(9)sd_eh_reset(9)sd_eh_action(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)init_sd(9)exit_sd(9)
okay that's the whole page, you ate that π
sign-off time: this little icon lives in ./drivers/scsi, dated October 2026, and answers to the name sd_remove(9). 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