blk_mark_disk_dead(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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:


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