disk_force_media_change(9)
π« disk_force_media_change(9) π«
okay bestie, welcome to the disk_force_media_change(9) page β it lives in the Kernel API Manual and it is literally the "hey everyone, the media changed!!" announcement system. π
β¨ NAME β¨
disk_force_media_change β force a media change event π¦
β¨ SYNOPSIS β¨
void disk_force_media_change (struct gendisk *disk );
β¨ ARGUMENTS β¨
diskβ the disk which will raise the event π like, this is the main character of the whole thing, it's the one screaming "the media changed!!"
β¨ DESCRIPTION β¨
So, you should call this when the media changes for disk. That's the whole vibe check. π
When that happens, it generates a uevent and attempts to free all the dentries and inodes, and it invalidates all block device page cache entries in that case. yes, all of them. it's giving spring cleaning, honestly. π₯
β οΈ ok so important heads up bestie: callers that need a partition re-scan should arrange for one explicitly. this function does NOT do it for you, no cap. don't be out here assuming, because it will not happen. π
β¨ SEE ALSO β¨
- Kernel file
./block/disk-events.c disk_block_events(9)disk_unblock_events(9)disk_flush_events(9)disk_clear_events(9)disk_check_media_change(9)
these are the whole squad, go read them too π«Άβ¨
kisses, this page came out of ./block, dated October 2026, and it's living its best life in the Kernel API Manual β disk_force_media_change(9) forever ππΈπ§
π¦ 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