blk_mark_disk_dead(9)
π blk_mark_disk_dead(9) π
okay so welcome to the Kernel API Manual bestie, today we're learning how to tell a disk it's β¨doneβ¨ β no cap, this is the "it's over for you" function πͺ¦
πΈ NAME πΈ
blk_mark_disk_dead β mark a disk as dead π
β¨ SYNOPSIS β¨
void blk_mark_disk_dead (struct gendisk *disk );
π ARGUMENTS π
diskβ the disk you're marking as dead, like, the actual victim here π«Ά
π¦ DESCRIPTION π¦
So what it does is mark the disk as dead (think: surprise removal, the disk just ghosted us π) and then it does not accept any new I/O to this disk. That's it. That's the whole vibe check. New I/O? Not on her watch. periodt. π
ngl this is the "no new friends" of block devices β existing state aside, no fresh I/O is getting through after this call.
π₯ SEE ALSO π₯
kernel file ./block/genhd.c and honestly the whole friend group:
bdev_count_inflight(9)__register_blkdev(9)add_disk_fwnode(9)device_add_disk(9)del_gendisk(9)invalidate_disk(9)disk_release(9)put_disk(9)set_disk_ro(9)
and that's the whole page, bestie π§π this iconic little writeup lives in ./block and it's dated October 2026 β go forth and mark those disks dead, iykyk πβπ
π¦ 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