sd_remove(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 subsequent sd_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:


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