disk_openers(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, this is disk_openers(9) from the Kernel API Manual (section 9), and it does exactly what it says on the tin: returns how many openers are there for a disk. no cap, that's the whole gig. πŸ’…

✨ SYNOPSIS ✨

unsigned int disk_openers (struct gendisk *disk );

πŸŽ€ ARGUMENTS πŸŽ€

  • disk β€” the disk to check, bestie 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

This returns the number of openers for a disk. Note that this value is only stable if disk->open_mutex is held. so like, if you need the number to actually stay put and mean something, hold that mutex, periodt. πŸ”₯

πŸ’€ NOTE πŸ’€

⚠️ due to a quirk in the block layer open code, each open partition is only counted once even if there are multiple openers. iykyk β€” that's the quirk, and it's giving β€œcounted once, not per-opener” energy. 😭

🌈 SEE ALSO 🌈


xoxo, source/version: ./include/linux, dated October 2026, page: disk_openers(9) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from