disk_openers(9)
π 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 π
- Kernel file
./include/linux/blkdev.hgenhd capability flags(9) disk_has_partscan(9)bio_needs_zone_write_plugging(9)disk_zone_capacity(9)blk_alloc_disk(9)queue_limits_start_update(9)queue_limits_cancel_update(9)bio_end_io_acct(9)
xoxo, source/version: ./include/linux, dated October 2026, page: disk_openers(9) β mwah πβ¨
π¦ 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