invalidate_disk(9)
π NAME π
invalidate_disk β invalidate the disk. This is page invalidate_disk(9) from the Kernel API Manual, and bestie, it's literally the clean the disk so it can be reused helper. π
β¨ SYNOPSIS β¨
void invalidate_disk (struct gendisk *disk );
π ARGUMENTS π
diskβ thestruct gendiskto invalidate. Hand this one over and let it get its reset moment. π«Ά
π¦ DESCRIPTION π¦
Okay so: this is a helper that invalidates the disk. It cleans the disk's associated buffer/page caches and resets its internal states so that the disk can be reused by the drivers. The way that's a full clean-slate vibe for drivers β iconic, no cap. β¨
π΄ CONTEXT π΄
can sleep β yes bestie, this one can sleep. π΄
π₯ SEE ALSO π₯
Kernel file ./block/genhd.c, plus the whole posse:
bdev_count_inflight(9)__register_blkdev(9)add_disk_fwnode(9)device_add_disk(9)blk_mark_disk_dead(9)del_gendisk(9)disk_release(9)put_disk(9)set_disk_ro(9)
That's the page, bestie π
β source/version ./block, date October 2026, and we are so done with invalidate_disk(9). πβ¨
π¦ 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