sd_release(9)
π sd_release β Kernel API Manual
okay so bestie, welcome to sd_release(9) β that's the kernel API manual page, and yes we're reading it together, grab a strawberry π
β¨ NAME β¨
sd_release β the function that gets invoked when the (last) close(2) is called on this scsi disk. no cap, that's literally the whole job π
πΈ SYNOPSIS πΈ
void sd_release (struct gendisk *disk );
π ARGUMENTS π
diskβ the disk to release, bestie. that's it. that's the argument π¦
π DESCRIPTION π
Returns 0.
that's it. that's the description. iconic minimalism, honestly π
π₯ NOTE π₯
β οΈ heads up babes β this one may block (uninterruptible) if error recovery is underway on this disk. so likeβ¦ she might just sit there and not move until the disk sorts itself out π do with that what you will.
Locking: called with disk->open_mutex held. fr fr, keep that in mind β the mutex is already yours when you walk in π«Ά
π¦ SEE ALSO π¦
Kernel file ./drivers/scsi/sd.c β like, the whole source, go read it iykyk π β plus these absolute icons:
sd_group_number(9)sd_open(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)sd_remove(9)init_sd(9)exit_sd(9)
and that's the page, bestie π this whole thing lives over in ./drivers/scsi and the manual itself is dated October 2026 β so like, future vibes only β anyway ily, go close some disks πππΈ
π¦ 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