disk_force_media_change(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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 ✨

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